Double caching?

Open
#227 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
go

Research direction

Start at the r.Options.String() handling and trace how the image proxy constructs cache keys for the URL and the URL with the #options suffix. Confirm why the 0x0 case produces both entries, then establish the intended caching behavior and cover it with a regression test; no file or test path is named in the issue.

Written by the indexing model from the issue text.

Description

When there is no any option (r.Options.String() = 0x0) it leads to double caching (no fragment cached image ({remote_url}) and fragment cached image ({remote_url}#options).
Ofc, I can fix it just by adding extra check `r.Options.String() == "0x0", but I have some questions:

  1. why it works like that?
  2. is there any problem to disable caching for 0x0 version of image?
Dominant language
Go
Stars
4k
Forks
513
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from willnorris/imageproxy

All issues in willnorris/imageproxy

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.