##// END OF EJS Templates
Show localized tags under the proper letter section in all tags list. Cache localized tag name, not the whole view
Show localized tags under the proper letter section in all tags list. Cache localized tag name, not the whole view

File last commit:

r1586:931a7e94 default
r1892:0808e889 default
Show More
invalidate_sync_cache.py
20 lines | 565 B | text/x-python | PythonLexer
from django.core.management import BaseCommand
from django.db import transaction
from boards.models import GlobalId
__author__ = 'neko259'
class Command(BaseCommand):
help = 'Removes local global ID cache'
@transaction.atomic
def handle(self, *args, **options):
count = 0
for global_id in GlobalId.objects.exclude(content__isnull=True).exclude(
content=''):
if global_id.is_local():
global_id.clear_cache()
count += 1
print('Invalidated {} caches.'.format(count))