about summary refs log tree commit diff
path: root/kittybox-rs/src/database/redis
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-10-04 23:55:44 +0300
committerVika <vika@fireburn.ru>2022-10-04 23:55:44 +0300
commit6cb479acc61ab19f655cedd878283b214e352a3d (patch)
tree3fd47359714f4e7bac3f52d45e199a0ae5bc829b /kittybox-rs/src/database/redis
parent0e0d711a9d524c445a61a05831a824ac7080f3b8 (diff)
downloadkittybox-6cb479acc61ab19f655cedd878283b214e352a3d.tar.zst
media: Use ETag and If-None-Match
Note: this requires a reindex of the media database. For the default
CAS backend, use the following:

```bash
for i in */*/*/*/*.json; do
    etag="$(echo $i | sed -e 's/\///g' -e 's/\.json$//')";
    mv "$i" "$i.bak"
    cat "$i.bak" | jq '. + { "etag": '\""$etag"\"'}' > "$i"
    rm "$i.bak"
done
```

This change is backwards compatible, but caching headers won't be
emitted without etags present in the metadata.

Actual etags are backend-specific and might differ from backend to
backend.
Diffstat (limited to 'kittybox-rs/src/database/redis')
0 files changed, 0 insertions, 0 deletions