PHPackages                             globalis/wp-cubi-transient-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. globalis/wp-cubi-transient-cache

ActiveLibrary[Caching](/categories/caching)

globalis/wp-cubi-transient-cache
================================

0.3.0(3y ago)25.9k↓42.9%2GPL-2.0PHPPHP &gt;=8.0

Since Mar 21Pushed 3y ago2 watchersCompare

[ Source](https://github.com/globalis-ms/wp-cubi-transient-cache)[ Packagist](https://packagist.org/packages/globalis/wp-cubi-transient-cache)[ Docs](https://github.com/globalis-ms/wp-cubi-transient-cache)[ RSS](/packages/globalis-wp-cubi-transient-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (2)

[wp-cubi-transient-cache](https://github.com/globalis-ms/wp-cubi-transient-cache)
=================================================================================

[](#wp-cubi-transient-cache)

[![PHP Version Require](https://camo.githubusercontent.com/123f78aaeeee3e262857325ae1ad930dae78949f91c986da8d6df2f63ed1068a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f676c6f62616c69732f77702d637562692d7472616e7369656e742d63616368652f7068703f636f6c6f723d253233336662393131)](https://github.com/globalis-ms/wp-cubi-transient-cache/blob/master/composer.json)[![Latest Stable Version](https://camo.githubusercontent.com/cb6887506dbe43df015fbb01560b9eea7026e7208ebed0745dd6f0767bb1864f/68747470733a2f2f706f7365722e707567782e6f72672f676c6f62616c69732f77702d637562692d7472616e7369656e742d63616368652f762f737461626c65)](https://packagist.org/packages/globalis/wp-cubi-transient-cache)[![License](https://camo.githubusercontent.com/39b232eaf1d98bcf0caa856c244abfa3ec905146f6d88db7fd7d83003e1992cb/68747470733a2f2f706f7365722e707567782e6f72672f676c6f62616c69732f77702d637562692d7472616e7369656e742d63616368652f6c6963656e7365)](https://github.com/globalis-ms/wp-cubi-transient-cache/blob/master/LICENSE.md)

Persistent cache library based on WordPress transients

[![wp-cubi](https://github.com/globalis-ms/wp-cubi/raw/master/.resources/wp-cubi-500x175.jpg)](https://github.com/globalis-ms/wp-cubi/)

Features
--------

[](#features)

- Provides `Cache::set()` and `Cache::get()` methods, using transients
- Provides `Template::get()` method, that automatically caches required template part
- Automatically cache WordPress nav-menus out of the box
- Clear cache by group, when menus are saved, when posts are saved, when site URL changes

Installation
------------

[](#installation)

```
composer require globalis/wp-cubi-transient-cache

```

Usage
-----

[](#usage)

### Generic caching

[](#generic-caching)

Save a value in cache :

```
