def _set_datetime_mark(self, when): """Set the datetime mark for static pages to when.""" r = TxRedisMapper() r.set(STATIC_CACHE_KEY_LAST_MODIFIED, data=when) etag = hashlib.md5(when.isoformat()).hexdigest() r.set(STATIC_CACHE_KEY_ETAG, data=etag)