Skip to content

HYRAX-2177: Add EDL user id to cache key in EffectiveURLCache#1376

Merged
hannahilea merged 3 commits into
masterfrom
hr/HYRAX-2177-fix-cache-keys-effectiveurlcache
Jun 4, 2026
Merged

HYRAX-2177: Add EDL user id to cache key in EffectiveURLCache#1376
hannahilea merged 3 commits into
masterfrom
hr/HYRAX-2177-fix-cache-keys-effectiveurlcache

Conversation

@hannahilea

Copy link
Copy Markdown
Contributor

Description

Reference ticket: HYRAX-2177

Tasks

  • Ticket exists and is linked in title
  • Tests added/updated
  • Dead code removed
  • No TODOs added

@hannahilea hannahilea marked this pull request as ready for review June 3, 2026 19:08
@hannahilea hannahilea requested a review from ndp-opendap June 3, 2026 20:47

@ndp-opendap ndp-opendap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge side quest I hope!

Comment thread http/EffectiveUrlCache.cc Outdated
shared_ptr <EffectiveUrl> EffectiveUrlCache::get_cached_eurl(string const &url_key) {
shared_ptr <EffectiveUrl> EffectiveUrlCache::get_cached_eurl(string const &key_prefix) {
shared_ptr<EffectiveUrl> effective_url(nullptr);
auto url_key = append_edl_username_to_key(key_prefix);

@ndp-opendap ndp-opendap Jun 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my pedantic comment, which you should feel free to ignore...

Renaming url_key to key_prefix in the method signature and then appending the edl user name to the key_prefix it to get url_key is confusing.

Maybe use url_prefix instead?

shared_ptr <EffectiveUrl> EffectiveUrlCache::get_cached_eurl(string const &url_prefix) {
    auto url_key = append_edl_username_to_key(url_prefix);

Also, though it may not matter here at all, when we did this in for the disk cache files (cmr etc) we prepended the edl username to the cache file name so that it was super easy to see who owned what things.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's a good point. I don't love url_prefix, but I'll switch it to url---that doesn't imply that it is the key, at least.

And nope, luckily not a huge side quest, especially since I did #1375 first! phew.

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@hannahilea hannahilea merged commit 11a74fe into master Jun 4, 2026
7 of 10 checks passed
@hannahilea hannahilea deleted the hr/HYRAX-2177-fix-cache-keys-effectiveurlcache branch June 4, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants