Home >Backend Development >PHP Tutorial >php apc cache usage example
3. apc usage example APC is very simple to use. See the following examples of adding, querying, modifying, and deleting. 1), add a cache, the effective time is 3600 seconds apc_add('name', 'tom', 3600); Execute the code, and then check the User Cache Entries. You can see that there is an additional cache data with the key value name: Among them are the number of hits, size, expiration time, etc. 2) Query cache
3), modify cache
4), delete cache
5), increasing and decreasing numbers If the cached content is a number, you can use apc_ inc to increase by 1 and apc_dec to decrease by 1.
6), determine whether the cache exists
|