mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 02:19:12 -04:00
Cache the JSON in Redis
The endpoints are probably fast enough, but it seems risky to have a public URL which causes a new query every time the page is loaded.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from app.notify_client import NotifyAdminAPIClient
|
||||
from app.notify_client import NotifyAdminAPIClient, cache
|
||||
|
||||
|
||||
class PerformanceDashboardAPIClient(NotifyAdminAPIClient):
|
||||
|
||||
@cache.set('performance-stats-{start_date}-to-{end_date}')
|
||||
def get_performance_dashboard_stats(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user