Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

KGO-1033 ensure that CACHE_LIFETIME option is respected

  • Loading branch information...
commit 1574c1ae61aabc74efe797b584320b380c03919d 1 parent 73b0fda
@akinspe akinspe authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/DataRetriever.php
View
5 lib/DataRetriever.php
@@ -227,6 +227,10 @@ protected function init($args) {
$args['PARSER_CLASS'] = 'PassthroughDataParser';
}
}
+
+ if (!isset($args['CACHE_LIFETIME'])) {
+ $args['CACHE_LIFETIME'] = $this->DEFAULT_CACHE_LIFETIME;
+ }
// instantiate the parser class
$parser = DataParser::factory($args['PARSER_CLASS'], $args);
@@ -234,7 +238,6 @@ protected function init($args) {
$cacheClass = isset($args['CACHE_CLASS']) ? $args['CACHE_CLASS'] : 'DataCache';
$this->cache = DataCache::factory($cacheClass, $args);
- $this->cache->setCacheLifetime($this->DEFAULT_CACHE_LIFETIME);
}
public function clearInternalCache() {

0 comments on commit 1574c1a

Please sign in to comment.
Something went wrong with that request. Please try again.