Permalink
Browse files

Support second argument on keyword pre-fetch

Allow the use cache flag to skip calling the cache if necessary.
  • Loading branch information...
ianbarber committed Apr 3, 2013
1 parent ea8f768 commit 03b6643a250155ba28cd6921321fe7ad8504a6df
Showing with 2 additions and 1 deletion.
  1. +2 −1 plugins/apc-cache/plugin.php
@@ -84,9 +84,10 @@ function apc_cache_plugin_statechange($plugin) {
function apc_cache_pre_get_keyword($args) {
global $ydb;
$keyword = $args[0];
+ $use_cache = isset($args[1]) ? $args[1] : true;
// Lookup in cache
- if(apc_exists($keyword)) {
+ if($use_cache && apc_exists($keyword)) {
$ydb->infos[$keyword] = apc_fetch($keyword);
}
}

0 comments on commit 03b6643

Please sign in to comment.