Skip to content

Commit

Permalink
Add custom purge cache
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Jun 22, 2018
1 parent aba63a3 commit 39a54c3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/_cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ public function process($curlRequest, $more, $ttl)
$bool = $callback($r, $CurlHelper);
}
if ($bool===false) {
call_user_func($r->purge);
$r->purge();
}

\PMVC\dev(
/**
* @help Purge minons cache
*/
function() use ($r) {
$r->purge();
}, 'purge-'.$r->dbCompositeKey);

\PMVC\dev(
/**
* @help Minons cache status. could use with ?--trace=[curl|curl-json]
Expand Down

0 comments on commit 39a54c3

Please sign in to comment.