diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-02-05 15:07:36 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-02-05 15:07:36 +0100 |
commit | 7072efe5beea6b7dd854c5468f0beb8b5914f082 (patch) | |
tree | c6f4f7d35fbd7dc1198dae7e7047e7cc31982b76 /index.pl | |
parent | 358dd887d7e3f5a7ada7a95e9b279250dad22e2b (diff) |
Allow cache root to be set via env
Diffstat (limited to 'index.pl')
-rw-r--r-- | index.pl | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -36,19 +36,20 @@ sub get_results_for { my $data; my $cache_hafas = Cache::File->new( - cache_root => '/tmp/dbf-hafas', + cache_root => $ENV{DBFAKEDISPLAY_HAFAS_CACHE} // '/tmp/dbf-hafas', default_expires => $refresh_interval . ' sec', lock_level => Cache::File::LOCK_LOCAL(), ); my $cache_iris_main = Cache::File->new( - cache_root => '/tmp/dbf-iris-main', + cache_root => $ENV{DBFAKEDISPLAY_IRIS_CACHE} // '/tmp/dbf-iris-main', default_expires => '2 hours', lock_level => Cache::File::LOCK_LOCAL(), ); my $cache_iris_rt = Cache::File->new( - cache_root => '/tmp/dbf-iris-realtime', + cache_root => $ENV{DBFAKEDISPLAY_IRISRT_CACHE} + // '/tmp/dbf-iris-realtime', default_expires => '50 seconds', lock_level => Cache::File::LOCK_LOCAL(), ); |