Clearing the Cache
Using the clearCache() method
clearCache() method// Assuming you have an instantiated Guardian instance
$guardian = new Guardian('your-identifier', $cacheImplementation);
// Clear the cache for this Guardian instance
$result = $guardian->clearCache();
if ($result) {
echo "Cache cleared successfully!";
} else {
echo "Some or all cache entries could not be cleared.";
}Important Notes:
When to Use clearCache()
clearCache()Last updated