You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cache clear() function is not working correctly with Redis, getItem('{cachekey}') still returns data, after i cleared the cache with the clear() function. I'm using version 9.1.3. Even after a page refresh the data is not deleted.
use Phpfastcache\CacheManager;
$_cache = CacheManager::getInstance('redis', new Config(array(
'host' => '127.0.0.1',
'port' => 6379,
'password' => '',
'database' => 0,
'itemDetailedDate' => true
)));
// Clear all cache
$_cache->clear();
// Get cache data
$cacheKey = "test";
$item = $_cache->getItem($cacheKey);
$data = $item->get(); // I still get data after $_cache->clear()
When i delete the item with the following function it works correctly, but i want to delete the whole cache.
It's strange because $_cache->getItems() returns an empty array, but $_cache->getItem("test") is returning data. $_cache->deleteItem("test");
The text was updated successfully, but these errors were encountered:
* Returns a Cache Item representing the specified key.
*
* This method must always return a CacheItemInterface object, even in case of
* a cache miss. It MUST NOT return null.
*
The cache clear() function is not working correctly with Redis, getItem('{cachekey}') still returns data, after i cleared the cache with the clear() function. I'm using version 9.1.3. Even after a page refresh the data is not deleted.
When i delete the item with the following function it works correctly, but i want to delete the whole cache.
It's strange because $_cache->getItems() returns an empty array, but $_cache->getItem("test") is returning data.
$_cache->deleteItem("test");
The text was updated successfully, but these errors were encountered: