PHPackages                             icybee/module-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. icybee/module-cache

ActiveIcanboogie-module[Caching](/categories/caching)

icybee/module-cache
===================

Provides a common API and a centralized place to manage caches.

v3.0.0(9y ago)07063BSD-3-ClausePHPPHP &gt;=5.5.0

Since Oct 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Icybee/module-cache)[ Packagist](https://packagist.org/packages/icybee/module-cache)[ RSS](/packages/icybee-module-cache/feed)WikiDiscussions 4.0 Synced 2mo ago

READMEChangelogDependencies (4)Versions (7)Used By (3)

Cache
=====

[](#cache)

The Cache module (`cache`) provides a common API and a centralized place to manage caches.

The module comes with cache managers for the framework [ICanBoogie](http://icanboogie.org/).

Cache managers
--------------

[](#cache-managers)

### Creating your own cache manager

[](#creating-your-own-cache-manager)

You can use any kind of cache with the "cache" module, your manager only has to extends the `CacheManagerBase` class or implement the `CacheManager` interface.

The following properties must also be provided:

- (string) `title`: Title of the cache. The title is translated within the `cache.title` scope.
- (string) `description`: Description of the cache. The description is translated within the `cache.description` scope.
- (string) `group`: Caches are displayed by groups. The group of the cache can be defined using this property. The group is translated within the `cache.group` scope.
- (bool) `state`: Whether the cache is enabled.
- (int|bool) `size_limit`: Size limit of the cache, or `false` if not applicable.
- (int|bool) `time_limit`: Time limit of the entries in the cache, or `false` if not applicable.
- (string|null) `config_preview`: A preview of the cache configuration, or `null` if not applicable.
- (string) `editor`: The configuration editor, or `null` if not applicable.

Note: Because the `config_preview` and `editor` properties are seldom used, it is advised to use getters to return their values:

```
