mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4757] [Issue]: Re-imported background with the same filename displays the deleted image #2618
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2618
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SpicyMarinara on GitHub (Aug 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4757
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Deleting a background and importing a new image with the same filename causes Marinara to display the old, deleted image from the browser cache.
Expected behavior
The newly imported background should be displayed after replacing a deleted background with an image using the same filename.
Actual behavior
Marinara displays the previously deleted image instead of the newly imported image. Hard refresh did not resolve the issue.
Steps to reproduce
Environment
Logs, screenshots, or video
No logs, screenshots, or video provided.
Additional context
The reported root cause is the background file-serving route setting Cache-Control: public, max-age=31536000, immutable in packages/server/src/routes/backgrounds.routes.ts (line 715). Re-importing with the same filename reuses the same URL, such as /api/backgrounds/file/forest_camping, so the browser serves its stale cached copy. Backgrounds are rendered through CSS background-image, and Ctrl+Shift+R did not resolve the issue. The server-side thumbnail cache reportedly keys on modification time and is not affected. Possible fixes include adding a cache-busting query parameter based on modification time or a content hash, or replacing immutable long-term caching with shorter caching plus ETag/Last-Modified validation. Chatting mode was RP.
Discord thread: Importing a deleted background with the same filename serves a stale browser-cached copy
Discord thread link: https://discord.com/channels/1417099416812392641/1535653751900344340
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)
Discord thread transcript (1 message)
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Aug 8, 2026):
SpicyMarinara is taking this in the current assigned-issue sweep. I am preparing a focused draft PR against
stagingand will link it here shortly.@SpicyMarinara commented on GitHub (Aug 8, 2026):
Implementation is now tracked in draft PR #4761: https://github.com/Pasta-Devs/Marinara-Engine/pull/4761