Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python | ||
|
||
import re | ||
import time | ||
import os | ||
from collections import defaultdict | ||
import random | ||
from pprint import pprint | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "peterbecom.settings") | ||
application = get_wsgi_application() | ||
|
||
from django.core.cache import cache | ||
urls = cache.get('fancy-urls', {}) | ||
for key in urls: | ||
if 'blogitem-040601-1' in key: | ||
cache.delete(urls[key]) | ||
|
||
directory = 'peterbecom-static-content/_FSCACHE/plog/blogitem-040601-1' | ||
import shutil | ||
shutil.rmtree(directory) |