User cache for service in send_to_provider methods.

This will remove a call to the db if the service exists in the cache.
This commit is contained in:
Rebecca Law
2021-02-11 16:39:25 +00:00
parent 200f8aad81
commit 61af203ad6
4 changed files with 29 additions and 14 deletions

View File

@@ -75,6 +75,7 @@ class SerialisedTemplate(SerialisedModel):
class SerialisedService(SerialisedModel):
ALLOWED_PROPERTIES = {
'id',
'name',
'active',
'contact_link',
'email_from',
@@ -83,6 +84,8 @@ class SerialisedService(SerialisedModel):
'rate_limit',
'research_mode',
'restricted',
'prefix_sms',
'email_branding'
}
@classmethod