Skip to content

Instantly share code, notes, and snippets.

@capooti
Created November 29, 2016 17:08
Show Gist options
  • Save capooti/623dc4210be397d4c703a4b2e5254666 to your computer and use it in GitHub Desktop.
Save capooti/623dc4210be397d4c703a4b2e5254666 to your computer and use it in GitHub Desktop.
from hypermap.aggregator.models import Layer
from hypermap.aggregator.tasks import index_cached_layers
from django.core.cache import cache
layers = Layer.objects.filter(service__srs__code=102100).filter(is_valid=True)
layers_cache = set([0])
for layer in layers:
layers_cache.add(layer.id)
index_cached_layers()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment