mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-05 05:50:41 -04:00
Merge pull request #4077 from alphagov/reduce-redis-cache-ttl
Reduce impact of bug with performance page caching stale data
This commit is contained in:
@@ -103,7 +103,7 @@ class JobApiClient(NotifyAdminAPIClient):
|
||||
redis_client.set(
|
||||
'has_jobs-{}'.format(service_id),
|
||||
b'true',
|
||||
ex=cache.TTL,
|
||||
ex=cache.DEFAULT_TTL,
|
||||
)
|
||||
|
||||
return job
|
||||
|
||||
@@ -3,7 +3,7 @@ from app.notify_client import NotifyAdminAPIClient, cache
|
||||
|
||||
class PerformanceDashboardAPIClient(NotifyAdminAPIClient):
|
||||
|
||||
@cache.set('performance-stats-{start_date}-to-{end_date}')
|
||||
@cache.set('performance-stats-{start_date}-to-{end_date}', ttl_in_seconds=3600)
|
||||
def get_performance_dashboard_stats(
|
||||
self,
|
||||
*,
|
||||
|
||||
@@ -6,7 +6,7 @@ class StatusApiClient(NotifyAdminAPIClient):
|
||||
def get_status(self, *params):
|
||||
return self.get(url='/_status', *params)
|
||||
|
||||
@cache.set('live-service-and-organisation-counts')
|
||||
@cache.set('live-service-and-organisation-counts', ttl_in_seconds=3600)
|
||||
def get_count_of_live_services_and_organisations(self):
|
||||
return self.get(url='/_status/live-service-and-organisation-counts')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user