Created
August 25, 2018 11:27
-
-
Save manchumahara/3ce66d605122d6ea659b278fb65885bd to your computer and use it in GitHub Desktop.
Key Value Caching in Joomla part 2 https://codeboxr.com/key-value-caching-in-joomla/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( false === ( $cache_data = $cache->get( 'your_key_here', '' ) ) ) { | |
// we are here, means there is no data in cache. so let's put something in cache | |
$cache_data = 'I fucking love Joomla documentation!'; | |
//now cache the data $cache_data | |
$cache->store($data, 'your_key_here', '' ); //if cache stored | |
} | |
//$cache_data is the data we get from cache | |
var_dump($cache_data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment