<password>MY_CONTENT_PASSWORD</password>
-->
</added_content>
+ <zips_file>/openils/var/data/zips.txt</zips_file>
+ <spelling_dictionary>/openils/var/data/oils_authority.dict</spelling_dictionary>
+ <cache_timeout>600</cache_timeout>
</app_settings>
my $pfx = "open-ils.search_";
my $cache;
+my $cache_timeout;
sub initialize {
$cache = OpenSRF::Utils::Cache->new('global');
+ my $sclient = OpenSRF::Utils::SettingsClient->new();
+ $cache_timeout = $sclient->config_value(
+ "apps", "open-ils.search", "app_settings", "cache_timeout" ) || 300;
+ $logger->info("Search cache timeout is $cache_timeout");
}
if( $docache ) {
$logger->debug("putting search cache $ckey\n");
- $cache->put_cache($ckey, \@recs, 900);
+ $cache->put_cache($ckey, \@recs, $cache_timeout);
}
return { ids => \@recs,
-#$cache_handle->put_cache( "_open-ils_seed_$username", $seed, 30 );
-#my $current_seed = $cache_handle->get_cache("_open-ils_seed_$username");
-#$cache_handle->delete_cache( "_open-ils_seed_$username" );
-
sub search_cache {
my $key = shift;
if(!$recs) {
$recs = new_editor()->request($method, %$args);
- $cache->put_cache($ckey, $recs, 900);
+ $cache->put_cache($ckey, $recs, $cache_timeout);
$recs = [ @$recs[$offset..($offset + ($limit - 1))] ];
}