Configuration - scached
Example configuration file. Please note disappointing fact that configuration is not completely tested and not all values might work as expected. This will be corrected on future releases as bugs are found out.
# loglevel is between 0 and 255, larger values result # more logging to syslog loglevel 0 # obstack chunk is blocksize for memory allocation # dont change unless you are debugging obstack-chunk 128k # read-bufferlen is size of stack buffer on what # io-loop tries to operate. low values result unnecessary # memory allocations and lower performance. read bufferlen # shoult be at least twice the expected maximum request # packet from client read-bufferlen 80k # default expire delay for newly created sessions, unless # otherwise requested on scache_open/scache_reset on clients # ini-settings expire-delay 1800 # socket buffer sizes for reading and writing. Dont change unless # you know what you do. can be smaller if very lot of separate # socket-connections will be expected sock-sndbuf 64k sock-rcvbuf 64k # max expected request size effectively max size of data to # store in one request, change to lower if you expect hostile # clients otherwise don't touch max-reqsize 16777215 # pending sockets to queue listen-backlog 100 # default listening port. note that if there is not explicit # listen directives given daemon listens on all # addresses on listen port below listen-port 50659 # pidfile path pidfile-path /var/run/scached.pid # user and group-id to run server as runas-user nobody runas-group nogroup # listening unix-sockets settings unix-sock-owner nobody unix-sock-group nogroup unix-sock-path /var/run/scached.sock unix-sock-mask 0666 # debugging and running foreground debug false nodetach false foreground false # allow usage of auth partitions enable-auth-partitions true # allow usage of host based partitions enable-host-partitions true # disable unix-socket disable-unix false # disable ipv4 socket disable-ipv4 false # disable ipv6 socket disable-ipv6 false # allow ring operations on default (fallback) partition defpart-allow-ring true # allow counters on default (fallback) partition defpart-allow-lvals true # allow counters on default (fallback) partition defpart-allow-cache true # allow querying statistics of default (fallback) partition defpart-allow-stats true # allow storing shared data with scache_sh* function to # default (fallback) partition defpart-allow-shared true # allow creating sessions on default (fallback) partition defpart-allow-session true # allow collecting keys on session namespace defpart-allow-collect true # allow collecting keys on shared namespace defpart-allow-shcollect true # addresses and ports to listen at. note that if there is not # explicit listen directives, daemon will listen on all # interfaces addresses listen-addr 127.0.0.1(50659) listen-addr-ipv6 ::1(50659) #listen-addr my.public.hostname(50659) # partition specification partition "important" { # limits for partition, memory, count of nodes and total cache memory-limit 256M nodes-limit 512M cache-limit 512M # limit for total memory of ring-items on partition ring-limit 64K # limiting certain features. see defpart-allow-* entries allow-ring true allow-lvals true allow-cache true allow-stats true allow-session true allow-shared true allow-collect true allow-shcollect true } partition "lowvalues" { # limits for partition, memory, count of nodes and total cache memory-limit 512K nodes-limit 64K cache-limit 2M # limiting certain features. see defpart-allow-* entries allow-ring false allow-lvals true allow-cache true allow-stats false allow-session true allow-shared false allow-collect false allow-shcollect false } # assigning clients to partitions can be done either by # hostname or client-sent auth string. these strings # are matched by regexps and assinged to specified # partition if regexp matches # assignments are processed in session creation phase # from first to last clients are assigned by first matching # line assign host ".*\.domain\.org" to partition "important" assign auth "mySecurityIdentifierFromPhpIni" to partition "important" assign host ".*" to partition "lowvalues"