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

85 questions
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 <…
Liron Harel
  • 10,819
  • 26
  • 118
  • 217
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…
4
votes
2 answers

How do polymorphic inline caches work with mutable types?

A polymorphic inline cache(PIC) works by caching the actual method by the type of the object, in order to avoid the expensive lookup procedures (usually a hashtable lookup). How does one handle the type comparison if the type objects are mutable…
3
votes
1 answer

C++ Using `.reserve()` to pad `std::vector`s as a way of protecting against multithreading cache invalidation and false sharing

I have a program with the general structure shown below. Basically, I have a vector of objects. Each object has member vectors, and one of those is a vector of structs that contain more vectors. By multithreading, the objects are operated on in…
Matt Munson
  • 2,903
  • 5
  • 33
  • 52
3
votes
2 answers

AWS Cloudfront cache invalidation paths usage

I am using s3 bucket as origin in cloudfront to cache and host my reactjs website. After every deployment on s3 i want to invalidate the cache of my cloudfront distribution so that the user can get the latest build deployed.. Moreover, while reading…
3
votes
1 answer

Find which SQL queries from a list of predefined queries are impacted by an INSERT, UPDATE, or DELETE

Introduction I am building a caching system where each node of the cache may call any number of SQL queries from a predefined, finite, set of SQL queries with 0-n parameters. Based on the result of those queries, the node does a rather slow…
Nicolas Keller
  • 701
  • 5
  • 8
3
votes
0 answers

Cache invalidation; refetch practices when nothing says the data has changed, but it might have?

While learning about GraphQL and Apollo, I went through this tutorial series. It shows how to create an application, that has: A channel list view (/) Shows all channels Allows to open up channel detail view Allows to create new channel A…
tomsseisums
  • 13,168
  • 19
  • 83
  • 145
3
votes
2 answers

How to clear cache for a subject in Shiro

Shiro provides cache feature but in my case, I'm using dynamic roles and permissions for the users. I need to expire the cache for a particular user if any so that changes in permissions immediately affect to user. There is a method in Realm, but…
Ankit Katiyar
  • 2,631
  • 2
  • 20
  • 30
2
votes
1 answer

How to invalidate cloudfrontcahce for a specific folder on S3 in NodeJS?

I would like to invalidate a folder (and the subfolders) in the s3 bucket in node js. This is the script I am using at the moment: var clearCloudfrontCache = function() { console.log("clearCloudfrontCache function started"); var cloudfront =…
2
votes
1 answer

FOSHttpCacheBundle cache invalidation with Symfony built-in reverse proxy doesn't work

I'm trying to do a hard thing: implementing cache invalidation with Symfony 4.4.13 using FOSHttpCacheBundle 2.9.0 and built-in Symfony reverse proxy. Unfortunately, I can't use other caching solution (like Varnish or Nginx) because my hosting…
2
votes
2 answers

Is file modification time reliable for cache invalidation?

I want to invalidate some locally generated cache every time file is modified. Invalidation would happen on running manually some command-line tool (no live watch required) My approach would be to: First generate cache and store file modification…
zduny
  • 2,481
  • 1
  • 27
  • 49
2
votes
3 answers

Azure - Send message to all other Roles and wait for response

A really common pattern that I need in multi instance web applications is invalidating MemoryCaches over all instances - and waiting for a confirmation that this has been done. (Because a user might otherwise after a refresh suddenly see old data on…
Dirk Boer
  • 8,522
  • 13
  • 63
  • 111
2
votes
1 answer

Database layer caching, triggers and invalidation

I have a DAL which is used to persist a large number of time-series measurements into a RDBMS database (MS SQL Server). There is also a web app which connects to this database and displays trends online (usually charts several months of data, with,…
Lou
  • 4,244
  • 3
  • 33
  • 72
2
votes
1 answer

Count of CloudFront's Invalidation Requests

I used * wildcard to clear everything and now wish to check the total number of invalidation requests made. How can I know that?
S R
  • 657
  • 3
  • 10
  • 21
2
votes
0 answers

C# Redis Cache: How to check if a particualar key-value is changed and then invalidate and set the nw value from Data Tier (i.e. Original Source)

Looking for implementation which: 1) checks for the key if the value is changed. 2) if yes invaludates the key. 3) sets the key with new value from the Data Tier(i.e. Original Source)
wadhwa94
  • 153
  • 1
  • 13