You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP cache rework and enable caching for storage assets (#13569)
This enabled HTTP time-based cache for storage assets, primarily
avatars. I have not observed If-Modified-Since from browsers during
tests but I guess it's good to support regardless.
It introduces a new generic httpcache module that can handle both
time-based and etag-based caching.
Additionally, manifest.json and robots.txt are now also cachable.
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+1-1
Original file line number
Diff line number
Diff line change
@@ -389,7 +389,7 @@ GRACEFUL_HAMMER_TIME = 60s
389
389
; Allows the setting of a startup timeout and waithint for Windows as SVC service
390
390
; 0 disables this.
391
391
STARTUP_TIMEOUT = 0
392
-
; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time, default is 6h
392
+
; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time. Note that this cache is disabled when RUN_MODE is "dev". Default is 6h
393
393
STATIC_CACHE_TIME = 6h
394
394
395
395
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/config-cheat-sheet.en-us.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
262
262
-`KEY_FILE`: **https/key.pem**: Key file path used for HTTPS. From 1.11 paths are relative to `CUSTOM_PATH`.
263
263
-`STATIC_ROOT_PATH`: **./**: Upper level of template and static files path.
264
264
-`APP_DATA_PATH`: **data** (**/data/gitea** on docker): Default path for application data.
265
-
-`STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars.
265
+
-`STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars. Note that this cache is disabled when `RUN_MODE` is "dev".
-`ENABLE_PPROF`: **false**: Application profiling (memory and cpu). For "web" command it listens on localhost:6060. For "serv" command it dumps to disk at `PPROF_DATA_PATH` as `(cpuprofile|memprofile)_<username>_<temporary id>`
268
268
-`PPROF_DATA_PATH`: **data/tmp/pprof**: `PPROF_DATA_PATH`, use an absolute path when you start gitea as service
0 commit comments