Skip to content

Instantly share code, notes, and snippets.

@shaneshifflett
Created May 8, 2013 00:34
Show Gist options
  • Save shaneshifflett/5537338 to your computer and use it in GitHub Desktop.
Save shaneshifflett/5537338 to your computer and use it in GitHub Desktop.
clearing the cache
from django.core.management.base import BaseCommand, CommandError
from django.core.cache import cache
from django.test.client import Client
from django.test.client import RequestFactory
class Command(BaseCommand):
def handle(self, *args, **options):
cache.clear()
opts = {}#url parameters
c = Client()
print 'getting pending claims'
response = c.get('/get-pending-claims-everywhere/', opts, follow=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment