Rename caching.py -> client_caching.py.

The word caching can be ambiguous, and what's worse is this file
previously contained a decorator for server-side caching of a
response and a class for client-side caching of files. It was
confusing. This new separation and naming should make it easier
to find what you're looking for.
This commit is contained in:
voussoir 2021-01-05 13:03:41 -08:00
parent 8ab248a34e
commit 1d33923601
2 changed files with 4 additions and 2 deletions

View file

@ -21,6 +21,8 @@ class FileEtagManager:
We use the file's MD5 hash as the ETag, and will only recalculate it if the
file's mtime has changed since the last request.
Note, this class does not store any of the file's content data.
'''
def __init__(self, maxlen, max_age, max_filesize):
'''

View file

@ -13,7 +13,7 @@ from voussoirkit import pathclass
import etiquette
from . import caching
from . import client_caching
from . import decorators
from . import jinja_filters
from . import jsonify
@ -45,7 +45,7 @@ site.debug = True
site.localhost_only = False
session_manager = sessions.SessionManager(maxlen=10000)
file_etag_manager = caching.FileEtagManager(
file_etag_manager = client_caching.FileEtagManager(
maxlen=10000,
max_filesize=5 * bytestring.MIBIBYTE,
max_age=BROWSER_CACHE_DURATION,