Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Caching
File: CacheEngine.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Automattic\WooCommerce\Caching;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Interface for cache engines used by objects inheriting from ObjectCache.
[5] Fix | Delete
* Here "object" means either an array or an actual PHP object.
[6] Fix | Delete
*/
[7] Fix | Delete
interface CacheEngine {
[8] Fix | Delete
[9] Fix | Delete
/**
[10] Fix | Delete
* Retrieves an object cached under a given key.
[11] Fix | Delete
*
[12] Fix | Delete
* @param string $key They key under which the object to retrieve is cached.
[13] Fix | Delete
* @param string $group The group under which the object is cached.
[14] Fix | Delete
*
[15] Fix | Delete
* @return array|object|null The cached object, or null if there's no object cached under the passed key.
[16] Fix | Delete
*/
[17] Fix | Delete
public function get_cached_object( string $key, string $group = '' );
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Caches an object under a given key, and with a given expiration.
[21] Fix | Delete
*
[22] Fix | Delete
* @param string $key The key under which the object will be cached.
[23] Fix | Delete
* @param array|object $object The object to cache.
[24] Fix | Delete
* @param int $expiration Expiration for the cached object, in seconds.
[25] Fix | Delete
* @param string $group The group under which the object will be cached.
[26] Fix | Delete
*
[27] Fix | Delete
* @return bool True if the object is cached successfully, false otherwise.
[28] Fix | Delete
*/
[29] Fix | Delete
public function cache_object( string $key, $object, int $expiration, string $group = '' ): bool;
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Removes a cached object from the cache.
[33] Fix | Delete
*
[34] Fix | Delete
* @param string $key They key under which the object is cached.
[35] Fix | Delete
* @param string $group The group under which the object is cached.
[36] Fix | Delete
*
[37] Fix | Delete
* @return bool True if the object is removed from the cache successfully, false otherwise (because the object wasn't cached or for other reason).
[38] Fix | Delete
*/
[39] Fix | Delete
public function delete_cached_object( string $key, string $group = '' ): bool;
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Checks if an object is cached under a given key.
[43] Fix | Delete
*
[44] Fix | Delete
* @param string $key The key to verify.
[45] Fix | Delete
* @param string $group The group under which the object is cached.
[46] Fix | Delete
*
[47] Fix | Delete
* @return bool True if there's an object cached under the given key, false otherwise.
[48] Fix | Delete
*/
[49] Fix | Delete
public function is_cached( string $key, string $group = '' ): bool;
[50] Fix | Delete
[51] Fix | Delete
/**
[52] Fix | Delete
* Deletes all cached objects under a given group.
[53] Fix | Delete
*
[54] Fix | Delete
* @param string $group The group to delete.
[55] Fix | Delete
*
[56] Fix | Delete
* @return bool True if the group is deleted successfully, false otherwise.
[57] Fix | Delete
*/
[58] Fix | Delete
public function delete_cache_group( string $group = '' ): bool;
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function