Skip to content

Commit

Permalink
don't cache locally
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 5, 2023
1 parent 9cd42dc commit 8a52b00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion posthog/year_in_posthog/calculate_2023.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import timedelta
from typing import Dict, Optional

from django.conf import settings
from django.db import connection

from posthog.cache_utils import cache_for
Expand Down Expand Up @@ -129,7 +130,7 @@ def dictfetchall(cursor):


@timed("year_in_posthog_2023_calculation")
@cache_for(timedelta(seconds=30))
@cache_for(timedelta(seconds=0 if settings.DEBUG else 30))
def calculate_year_in_posthog_2023(user_uuid: str) -> Optional[Dict]:
with connection.cursor() as cursor:
cursor.execute(query, {"user_uuid": user_uuid})
Expand Down

0 comments on commit 8a52b00

Please sign in to comment.