Moved the cache key to the utils module.

Renamed the dao method.
This commit is contained in:
Rebecca Law
2017-02-14 14:22:52 +00:00
parent 1c6cfb9bc8
commit 53b7ad0961
7 changed files with 27 additions and 25 deletions

View File

@@ -63,3 +63,7 @@ def get_london_month_from_utc_column(column):
"month",
func.timezone("Europe/London", func.timezone("UTC", column))
)
def cache_key_for_service_template_counter(service_id, limit_days=7):
return "{}-template-counter-limit-{}-days".format(service_id, limit_days)