PHP code example of wnipun / wp-memoize
1. Go to this page and download the library: Download wnipun/wp-memoize 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/ */
wnipun / wp-memoize example snippets
use wnipun\Memoize\Memoize;
$bulletin = Memoize::query([
'post_type' => 'bulletin',
'posts_per_page' => 3
])
->withFields([
'bulletin_agency',
'bulletin_thumbnail'
])
->withTaxonomies([
'bulletin_category'
])
->cache();
// Clear everything
Memoize::clear();
// Clear provided post types
Memoize::clear('bulletin', 'news');