Rest API - Caching Strategies
You have this code snippet for versioning cache invalidation:
cache = { 'v1': data1 }
function getData(version) {
return cache[version];
}
// Later
cache['v2'] = newData;
What is the main bug if the client still requests v1 after update?