Skip to content
Interface to memcached for AOLserver.
C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE Renamed AOLREADME to README, restored LICENSE file. Sep 3, 2010
Makefile
README Renamed AOLREADME to README, restored LICENSE file. Sep 4, 2010
nsmemcache.c Update to nsmemcache from Majid Khan on 2010-09-03 Sep 3, 2010
nsmemfunc.h Update to nsmemcache from Majid Khan on 2010-09-03 Sep 4, 2010
nsmemsock.h Update to nsmemcache from Majid Khan on 2010-09-03 Sep 4, 2010

README

 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 vlad@crystalballinc.com

 Ported For AOLServer By:
     Majid Khan majidkhan59@yahoo.com
 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
Something went wrong with that request. Please try again.