PHP code example of tequilarapido / result-cache
1. Go to this page and download the library: Download tequilarapido/result-cache library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tequilarapido / result-cache example snippets
php
use Tequilarapido\ResultCache\ResultCache;
class BooksCache extends ResultCache {
public function key() {
return 'app.books.all';
}
public function data() {
// Some heavy / resources consuming operations
// ...
return $books;
}
}
php
(new BooksCache)->forget()
php
(new BooksCache)->forget()