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.

Declarative Cache Control API

See original GitHub issue

I’ve been sitting on this for a while as a future feature but hadn’t documented it.

The API would allow specifying a cache interaction policy both “downward” on the load and “upward” back through the processing. Through this you can facilitate complex cache interactions for both valid and seemingly-questionable use cases.

Random subset of interactions from other issues:

  • Skip memory cache “downward” only.
  • Skip memory cache “upward” only.
  • Load from local cache (memory or disk) only.
  • Force re-load from network.

I’m not going to do a full-on API strawman, but I know we’ll probably want some EnumSet action with

public enum BitmapSource { MEMORY, DISK, NETWORK }
public enum BitmapSink { MEMORY, DISK }

This API will trump the existing weak skipCache() method on RequestCreator.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:37 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeWhartoncommented, Dec 12, 2014

One is reading, the other is writing, respectively.

On Thu, Dec 11, 2014, 6:52 PM rothschild86 notifications@github.com wrote:

Awesome to see progress on this. What’s the difference between NO_CACHE and NO_STORE?

— Reply to this email directly or view it on GitHub https://github.com/square/picasso/issues/438#issuecomment-66725587.

0reactions
parthanjariacommented, Jun 21, 2018

I am also facing similar problem. I am using 2.5.2 version.

I have an image(profile_picture) at a url. Now i want that to be cached. But when I re-upload/change the image on the server with same link, i want picasso to update that image.

I tried using invalidate(url), memoryPolicy(NO_CACHE), networkPolicy(NO_CACHE) but nothing seems to work. need urgent solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing API cache control | Fastly Help Guides
This guide explains how to implement API cache control. Once you've enabled API caching, and ensured purging works properly with your cached ...
Read more >
Boost Your REST API with HTTP Caching - Kenneth Lange
Using HTTP caching can seriously boost the performance of your REST Services.
Read more >
Cache max-age | Cache API | Drupal Wiki guide on Drupal.org
Cache max-age provides a declarative way to create time-dependent caches. Some data is only valid for a limited period of time, in that...
Read more >
werkzeug.ResponseCacheControl — Flask API - GitHub Pages
A cache control for responses. Unlike RequestCacheControl this is mutable and gives access to response-relevant cache control headers.
Read more >
HTTP Caching Policy | MuleSoft Documentation
Caches HTTP responses from an API implementation ... In Local Mode, you apply the HTTP Caching policy to your API via declarative configuration...
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