locked
Variable Storing RRS feed

  • Question

  • User-2048372337 posted

    I just now read the manual and found the functions that store and retrieve variable values using wincache. Is there a document that provides an overview of these functions? I dont' understand what they are for and how these functions are used. Is this cross- user or cross-session caching? Or are these only to provide caching as an alternative to sessions. Sorry, I just don't get it.

    Monday, July 12, 2010 8:31 AM

All replies

  • User-2048372337 posted

    Well, I answered my own questions, I believe about cross-session and cross-user, because it appears to be both from my tests.

    Monday, July 12, 2010 8:50 AM
  • User-2048372337 posted

    For instance, the wincache_ucache_set() states the default TTL of 0 means that it won't be deleted, except explicitly. Yet, I took a while to do my first cross-session test and the value was gone. My second test, I did much quicker and it worked fine.

     

    Monday, July 12, 2010 9:05 AM
  • User-1405480850 posted

    The TTL (time to live) argument having default value '0' means that entry will never be deleted from cache. However if you set the same key to a different value using wincache_ucache_set again, the value will be overridden. If you do not want that value should be overridden if key already exists you can use wincache_ucache_add.

    Hope this helps.

    Thanks,

    Don.

    Monday, July 12, 2010 1:18 PM
  • User-2048372337 posted

    Ok, but I didn't do anything to clear it and my value disappeared.

    Monday, July 12, 2010 3:39 PM
  • User-1405480850 posted

    The values are stored in shared memory. Shared memory gets destroyed when all the php-cgi.exe exits or dies. You must be hitting the situation where because of inactivity php-cgi.exe is terminated and hence shared memory is gone. Since shared memory is gone, the variables stored there are gone too.

    Thanks,

    Don.

    Monday, July 12, 2010 3:43 PM