From c4d649bb0aff8d8cf286296fcce4330fd0deaff2 Mon Sep 17 00:00:00 2001 From: Joe Roberts Date: Sat, 13 Jul 2024 01:39:23 -0700 Subject: [PATCH] GITC-4619 Cache time-service requests --- docker/time_service/Dockerfile | 3 ++- docker/time_service/cache.conf | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 docker/time_service/cache.conf diff --git a/docker/time_service/Dockerfile b/docker/time_service/Dockerfile index 629918a2..8856ebc3 100755 --- a/docker/time_service/Dockerfile +++ b/docker/time_service/Dockerfile @@ -36,7 +36,8 @@ RUN luarocks make onearth_time_service-0.1-2.rockspec WORKDIR /home/oe2/onearth/docker RUN cp 00-mpm.conf /etc/httpd/conf.modules.d/ && \ cp 10-worker.conf /etc/httpd/conf.modules.d/ && \ - cp cors.conf /etc/httpd/conf.d/ + cp cors.conf /etc/httpd/conf.d/ && \ + cp ./time_service/cache.conf /etc/httpd/conf.d/ WORKDIR /home/oe2/onearth/docker/time_service # Install layer configuration tools diff --git a/docker/time_service/cache.conf b/docker/time_service/cache.conf new file mode 100644 index 00000000..82ed3fd5 --- /dev/null +++ b/docker/time_service/cache.conf @@ -0,0 +1,15 @@ +CacheQuickHandler off +CacheRoot /tmp/ +CacheEnable disk / +CacheDirLevels 4 +CacheDirLength 5 +CacheMaxFileSize 200000000 +CacheIgnoreNoLastMod On +CacheDefaultExpire 1800 +CacheIgnoreCacheControl Off +CacheLastModifiedFactor 0.5 +CacheHeader on +CacheLock on +CacheDetailHeader on +ExpiresActive On +ExpiresByType application/json "access plus 30 minutes"