PHPackages                             ride/lib-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ride/lib-cache

ActiveLibrary[Caching](/categories/caching)

ride/lib-cache
==============

Cache library of the Ride framework.

1.3(1y ago)05.5k5MIT

Since Oct 14Pushed 1y ago7 watchersCompare

[ Source](https://github.com/all-ride/ride-lib-cache)[ Packagist](https://packagist.org/packages/ride/lib-cache)[ RSS](/packages/ride-lib-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (14)Used By (5)

Ride: Cache Library
===================

[](#ride-cache-library)

Cache library of the PHP Ride framework.

What's In This Library
----------------------

[](#whats-in-this-library)

### CacheItem

[](#cacheitem)

A *CacheItem* is the container of your cached value. The implementation contains the logic to see if the cached item is valid and not stale.

An extension to tag your cache items is available through the *TaggableCacheItem* interface.

The *GenericCacheItem* class implements both interfaces.

### CachePool

[](#cachepool)

A *CachePool* is the backend or storage of your cache items. The implementation decides how to store your cache items. Each implementation has it's advantages and disadvantages. Your choice should depend on the context of cache usage and server environment.

Available implementations (all implement taggable cache items):

- ride\\library\\cache\\pool\\ApcCachePool: APC implementation
- ride\\library\\cache\\pool\\DirectoryCachePool: Cache directory with one file per cached item
- ride\\library\\cache\\pool\\FileCachePool: One file for the complete pool
- ride\\library\\cache\\pool\\MemcacheCachePool: Memcache implementation
- ride\\library\\cache\\pool\\XCacheCachePool: XCache implementation

### CacheControl

[](#cachecontrol)

A *CacheControl* provides an interface to expose the management of your caches to the UI.

Code Sample
-----------

[](#code-sample)

Check the following code sample to see how the cache should be used:

```
