forked from aolserver/nsmemcache
-
Notifications
You must be signed in to change notification settings - Fork 0
Interface to memcached for AOLserver.
License
Zipcar/nsmemcache
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Configuration nsd.tcl ns_section ns/servers/server/modules ns_param nsmemcache nsmemcache.so ns_section ns/server/module/nsmemcache ns_param server localhost ## If you have more then one server then define it in a new line ns_param server cache Usage ns_memcache get key dataVar ?lengthVar? ?flagsVar? ## This command set the value in a unique key and if key already exists then the old value ## replaced with the new one ns_memcache set key value ?expires? ?flags? ## This command add the value one time and if you ## add again with the same key in your script then it will not be overriden ## If you want to override the value of the same key then use replace one ns_memcache add key value ?expires? ?flags? ns_memcache replace key value ?expires? ?flags? ns_memcache delete key ?expires? ns_memcache incr key value ?varname? ns_memcache decr key value ?varname? ns_memcache version ?ip? Authors Vlad Seryakov [email protected] Ported For AOLServer By: Majid Khan [email protected] Example: 1) set check [ns_memcache version "192.168.5.8"] print $check 2) # store the value for 1 min i.e. 60secs ns_memcache set firstkey firstvalue 60 3) # Will delete firstkey and then you can define another or add another key instantly ns_memcache delete firstkey # But if you delete the firstkey with epxiry then the delted key will be never be added # untill the expiry time becomes over. # firstkey can only be set after 1 min not before then that ns_memcache delete firstkey 60 4) # The below will increment the value 3 to what our the value of the key is in the memory ns_memcache incr firstkey 3 5) This one is incomplete one... :( # The below will increment the value 3 to what our the value of the key is in the memory ns_memcache decr firstkey 6) # Replace the key value with the new one # but the value should be set in the memmory first see above the seond example ns_memcache replace key value
About
Interface to memcached for AOLserver.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published