PHP code example of alleyinteractive / cache-collector
1. Go to this page and download the library: Download alleyinteractive/cache-collector 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/ */
alleyinteractive / cache-collector example snippets
cache_collector_register_key( string $collection, string $key, string $group = '', int $ttl = 0, string $type = 'cache' );
// Example using named arguments.
cache_collector_register_key(
collection: 'related_posts',
key: $related_posts_cache_key,
group: 'related_posts',
ttl: 3600,
type: 'cache',
);