Cache Management for Complex Web Apps — A Primer
Stephen Hallgren
91

What if scenario: PatientId =100, LoggedOnUser = 1, LoggedOnUser = 2. There are two client machines that searched the same Patient within a 15 minute period. A key is generated for both clients: {patient.patientid.loggedonuser}

CacheKeys = patient.100.1 | patient.100.2

The patient’s last name has been updated by: LoggedOnUser = 1. How would you clear all {patient.patientid.loggedonuser} cachekeys because one client updated the patient data? LoggedOnUser = 2 needs the updated patient’s lastname.

I’m logically thinking about a wildcard and that way LoggedOnUser = 2 will be cleared and the code will fetch the new data from the database and reload in cache. Do you have gist/snippet?

Thanks for the great article.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.