__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Timber\Cache;
use Twig\CacheExtension\CacheStrategy\KeyGeneratorInterface;
class KeyGenerator implements KeyGeneratorInterface {
/**
* @param mixed $value
* @return string
*/
public function generateKey( $value ) {
if ( is_a($value, 'Timber\Cache\TimberKeyGeneratorInterface') ) {
return $value->_get_cache_key();
}
if ( is_array($value) && isset($value['_cache_key']) ) {
return $value['_cache_key'];
}
$key = md5(json_encode($value));
if ( is_object($value) ) {
$key = get_class($value).'|'.$key;
}
return $key;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Cleaner.php | File | 1.52 KB | 0775 |
|
| KeyGenerator.php | File | 576 B | 0775 |
|
| TimberKeyGeneratorInterface.php | File | 111 B | 0775 |
|
| WPObjectCacheAdapter.php | File | 705 B | 0775 |
|