Questions tagged [cache-invalidation]

Use cache-invalidation for questions related to purging content from a cache based on a state change in the cached object or a canonical object that it shadows

References

68 questions
126
votes
9 answers

Cache Invalidation — Is there a General Solution?

"There are only two hard problems in Computer Science: cache invalidation and naming things." Phil Karlton Is there a general solution or method to invalidating a cache; to know when an entry is stale, so you are guaranteed to always get fresh…
Greg
  • 295,929
  • 52
  • 357
  • 326
30
votes
3 answers

Jekyll Bootstrap based blog - Expire headers?

I have a Jekyll bootstrap based blog hosted on Github pages. My problem is: Every time I change something on my web page, I have to forcefully reload the page (CTRL + R) to see the changes. Jekyll or my browser does not seem to realize that there is…
Sebastian Hoitz
  • 9,145
  • 13
  • 56
  • 74
24
votes
4 answers

How to use Flask-Cache with Flask-Restful

How do I use Flask-Cache @cache.cached() decorator with Flask-Restful? For example, I have a class Foo inherited from Resource, and Foo has get, post, put, and delete methods. How can I can invalidate cached results after a…
cyberra
  • 524
  • 4
  • 13
16
votes
8 answers

Error:Cause: invalid stream header: 000900D9 in android studio 2.3.1

I am using android studio 2.3.1 and it was working fine yesterday But now it throw me an error Error:Cause: invalid stream header: 000900D9 this message throw from Messages Gradle Sync dialog. Below are the steps which i did to fixed this problem…
Suraj Bahadur
  • 2,901
  • 3
  • 18
  • 42
12
votes
1 answer

Why does CLFLUSH exist in x86?

I recently learned about the row hammer attack. In order to perform this attack the programmer needs to flush the complete cache hierarchy of a CPU for a specific number of addresses. My question is: why is CLFLUSH necessary in x86? What are the…
10
votes
2 answers

Get a string that represents a user's CanCan abilities

I want to cache a Post view, but the view depends on the permissions of the current user (e.g., I only show the "edit" link if current_user.can?(:edit, @post)) So I'd like my cache key to include a representation of the current user's CanCan…
Tom Lehman
  • 75,197
  • 69
  • 188
  • 262
8
votes
1 answer

Force browser to clear cache in Angular environment

There is a popular question on how to force-clear the cache of the browser in a VanillaJS application, with the general consensus being, setting the name of the .js-script or the scripts arguments to a new value: Force browser to clear cache How can…
Phil
  • 5,442
  • 6
  • 36
  • 70
8
votes
1 answer

Doctrine 2 result cache invalidation

I'm using Doctrine 2's result cache on a query retrieving the number of new messages of a user (messaging app): $query->useResultCache(true, 500, 'messaging.nb_new_messages.'.$userId); I tried to invalidate this cache like this (in my entity…
Nanocom
  • 3,596
  • 4
  • 29
  • 44
7
votes
1 answer

How to broadcast cache invalidate messages to all servers running a web app?

I have a Java based web app hosted on AWS. It is read-mostly so it makes a lot of sense to cache objects retrieved from the database for performance. When I do update an object, I would like to be able to broadcast to all the servers that the…
6
votes
1 answer

Docker cache invalidation

I'm having some weird issues with my custom Dockerfile, compiling a .Net core app in alpine containers. I've tried numerous different configurations to no avail - cache is ALWAYS invalidated when I implement the final FROM instruction (if I comment…
Spikeh
  • 3,326
  • 2
  • 21
  • 49
5
votes
1 answer

How can I detect/avoid updates to my cached React-based App? Or how can I detect a cache-invalidation before it happens?

I'm developing an app in React that does encryption on the client-side and sends the encrypted content back to the server for secure storage (e.g. think of online-wallets). This works well since the data is secure in case someone malicious gets…
Muppet
  • 4,934
  • 3
  • 23
  • 34
5
votes
0 answers

Cache invalidation using Webpack

I am appending hash ids to bundles generated by webpack. Whenever I get a new build I see that filenames are changed with new hash and index.html file is referencing these files. But after deploying my app, some users using Chrome don't see the new…
cubbuk
  • 7,410
  • 4
  • 29
  • 59
5
votes
1 answer

Invalidate Cache using VaryByCustom

I want to invalidate cache using VaryByCustom attribute. Following code is being used for cache setup. public override string GetVaryByCustomString(HttpContext context, string arg) { if (!string.IsNullOrWhiteSpace(arg)) { if…
5
votes
3 answers

Invalid paths using CloudFront create invalidation in C#

I am trying to invalidate CloudFront objects in C#/.NET and gettign the following exception: Your request contains one or more invalid invalidation paths. My Function: public bool InvalidateFiles(string[] arrayofpaths) { for (int i = 0; i <…
4
votes
2 answers

Pull to refresh in Domain Driven Design app

I need to implement pull to refresh in an iOS app, and I came across this thing, in where I don't know how to approach the problem with the best practices of DDD. The presentation layer has an event to refresh a list, this needs to update the…
1
2 3 4 5