Created
June 12, 2014 14:35
-
-
Save fer-ri/ef6e114d80f09d1088ba to your computer and use it in GitHub Desktop.
Delete Laravel Cache By Pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach (Cache::getMemory() as $cacheKey => $cacheValue) | |
{ | |
if (strpos($cacheKey, 'mypackage') !== false) | |
{ | |
Cache::forget($cacheKey); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment