Use new redis key for templates

Equivalent of https://github.com/alphagov/notifications-admin/pull/3639
but for the API.

This is the only place in the API we appear to be getting setting
templates or broadcast messages.
This commit is contained in:
David McDonald
2020-09-21 17:16:33 +01:00
parent 120b760cae
commit 5b0cc8819a
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ class SerialisedTemplate(SerialisedModel):
return cls(cls.get_dict(template_id, service_id)['data'])
@staticmethod
@redis_cache.set('template-{template_id}-version-None')
@redis_cache.set('service-{service_id}-template-{template_id}-version-None')
def get_dict(template_id, service_id):
from app.dao import templates_dao
from app.schemas import template_schema