File: _web_example9.py

package info (click to toggle)
nodebox-web 1.9.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,904 kB
  • ctags: 1,602
  • sloc: python: 7,582; ansic: 581; xml: 239; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Clearing the cache.

try:
    web = ximport("web")
except:
    web = ximport("__init__")
    reload(web)

# Queries and images are cached locally for speed,
# so it's a good idea to empty the cache now and then.
# Also, when a query fails (internet is down etc.),
# this "bad" query is also cached.
# Then you may want to clear the cache of the specific
# portion of the library you're working with,
# for example: web.morguefile.clear_cache()

web.clear_cache()