|
Memcache::set() stores an item var with key on the memcached server. Parameter expire is expiration time in seconds. If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time, it could be deleted from the cache to make place for other items).
You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib).
Also you can use memcache_set() function. See example below.
Notatka: Remember that resource variables (i.e. file and connection descriptors) cannot be stored in the cache, because they cannot be adequately represented in serialized state.
Przykład 2. Memcache::set() example
|
Zwraca TRUE w przypadku sukcesu, FALSE w przypadku porażki.
See also Memcache::add(), Memcache::replace().
Poprzedni | Spis treści | Następny |
Memcache::replace | Początek rozdziału | Mhash Functions |
Hosting by: Hurra Communications Sp. z o.o.
Generated: 2007-01-26 18:02:31