question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImageCacheStatsTracker's onDiskCacheHit should provide the cache key param

See original GitHub issue

Description

ImageCacheStatsTracker is used for tracking caching status like disk or encoded memory.

The onBitmapCacheHit, onMemoryCacheHit and onStagingAreaHit methods all provide the cache key param, from which we can get the request url.

However, the onDiskCacheHit method does not provide the cache key param. Are there any reasons not doing it?

Currently, there is a workaround to do so:

Set a CacheEventListener to the disk config on configuring the image pipeline, then do the record inside. It worked, but I think it’s not great.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
defHLTcommented, Sep 17, 2018

I think we can make this change. @JuniperPhoton @MONIKA-KUMAR-JETHANI help would be appreciated.

0reactions
defHLTcommented, Sep 19, 2018

Merged. Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cacheable key on multiple method arguments - Stack Overflow
I use this for a shared cache, in which I include the method name in the key as well, which the Spring default...
Read more >
29. Cache Abstraction - Spring
Since caches are essentially key-value stores, each invocation of a cached method needs to be translated into a suitable key for cache access....
Read more >
Controlling the cache key - Amazon CloudFront
With Amazon CloudFront, you can control the cache key for objects that are cached at CloudFront edge locations. The cache key is the...
Read more >
Manipulating the cache key | Fastly Help Guides
You can set the cache key explicitly (including attaching conditions) by adding a request setting via the Settings page in the configuration ...
Read more >
Spring cache annotations: some tips & tricks | iO
A more important caveat here is that the parameters themselves become an integral part of the cache key, and that can have an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found