Skip to content

Commit

Permalink
Clear sitetree cache
Browse files Browse the repository at this point in the history
  • Loading branch information
matyldv committed Mar 3, 2025
1 parent ec9befa commit 83c3157
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/ralph/dashboards/migrations/0008_auto_20250303_0923.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 2.2.28 on 2025-03-03 09:23
from __future__ import unicode_literals

from django.core.cache import caches
from django.db import migrations


def clear_sitetree_cache(apps, schema_editor):
try:
cache = caches["default"]
cache.delete("sitetrees")
except Exception:
pass

class Migration(migrations.Migration):

dependencies = [
('dashboards', '0007_auto_20240723_1148'),
]

operations = [
migrations.RunPython(
code=clear_sitetree_cache, reverse_code=clear_sitetree_cache
)
]

0 comments on commit 83c3157

Please sign in to comment.