Changeset 32480 in spip-zone for _plugins_/memoization/memo/xcache.inc


Ignore:
Timestamp:
Oct 29, 2009, 8:37:14 PM (11 years ago)
Author:
fil@…
Message:

apres quelques tests et debug, retour a l'API complete de cache_inc(key, VALUE, TTL)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/memoization/memo/xcache.inc

    r32474 r32480  
    66bool  cache_isset(string key)
    77bool  cache_unset(string key)
    8 int   cache_inc(string key)
    9 int   cache_dec(string key)
     8int   cache_inc(string key[, int value[, int ttl] ])
     9int   cache_dec(string key[, int value[, int ttl] ])
    1010bool  cache_lock(string key)
    1111bool  cache_unlock(string key)
     
    3434}
    3535
    36 function cache_inc($key) {
    37         return xcache_inc(_CACHE_NAMESPACE.$key);
     36function cache_inc($key, $value=null, $ttl=null) {
     37        return xcache_inc(_CACHE_NAMESPACE.$key, $value, $ttl);
    3838}
    3939
    40 function cache_dec($key) {
    41         return xcache_dec(_CACHE_NAMESPACE.$key);
     40function cache_dec($key, $value=null, $ttl=null) {
     41        return xcache_dec(_CACHE_NAMESPACE.$key, $value, $ttl);
    4242}
    4343
Note: See TracChangeset for help on using the changeset viewer.