szurubooru/server/szurubooru/middleware/cache_purger.py
rr- 9aea55e3d1 server/general: embrace most of PEP8
Ignored only the rules about continuing / hanging indentation.

Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00

8 lines
172 B
Python

from szurubooru.func import cache
from szurubooru.rest import middleware
@middleware.pre_hook
def process_request(ctx):
if ctx.method != 'GET':
cache.purge()