Override to customize cache control behavior. Return a positive number of seconds to make the result cacheable for that amount of time or 0 to mark resource as cacheable for an unspecified amount of time (subject to browser heuristics). By default returns ca
(
self, path: str, modified: Optional[datetime.datetime], mime_type: str
)
| 3141 | pass |
| 3142 | |
| 3143 | def get_cache_time( |
| 3144 | self, path: str, modified: Optional[datetime.datetime], mime_type: str |
| 3145 | ) -> int: |
| 3146 | """Override to customize cache control behavior. |
| 3147 | |
| 3148 | Return a positive number of seconds to make the result |
| 3149 | cacheable for that amount of time or 0 to mark resource as |
| 3150 | cacheable for an unspecified amount of time (subject to |
| 3151 | browser heuristics). |
| 3152 | |
| 3153 | By default returns cache expiry of 10 years for resources requested |
| 3154 | with ``v`` argument. |
| 3155 | """ |
| 3156 | return self.CACHE_MAX_AGE if "v" in self.request.arguments else 0 |
| 3157 | |
| 3158 | @classmethod |
| 3159 | def make_static_url( |