You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i am using http requests and custom cache objects to handle the caching.
i have a list of customer. if i do a "put" action after i inserted a customer into my db the cache is not updating/it. if i now refresh the site or "removeAll" from my custom cache object it is holding the data.
here's how i create my custom cache-object if (!CacheFactory.get('customerCache')) { customerCache = CacheFactory('customerCache', { maxAge: 15 * 60 * 1000, // Items added to this cache expire after 15 minutes cacheFlushInterval: 60 * 60 * 1000, // This cache will clear itself every hour deleteOnExpire: 'aggressive' // Items will be deleted from this cache when they expire }); } else { customerCache = CacheFactory.get('customerCache'); } this is how i do the put action:
`var customerCache = CacheFactory.get('customerCache');
and here how i get my list: var customerCache = CacheFactory.get('customerCache'); var deferred = $q.defer(); var start = new Date().getTime(); debugger $http.get('/Umbraco/Api/CustomerWebApi/getAllCustomerByUser', { cache: customerCache }).success(function (data) { console.log('time taken for request: ' + (new Date().getTime() - start) + 'ms'); deferred.resolve(data); }); return deferred.promise;
Why is the new inserted data not (visible) in the cach-object ?
The text was updated successfully, but these errors were encountered:
Hi,
i am using http requests and custom cache objects to handle the caching.
i have a list of customer. if i do a "put" action after i inserted a customer into my db the cache is not updating/it. if i now refresh the site or "removeAll" from my custom cache object it is holding the data.
here's how i create my custom cache-object
if (!CacheFactory.get('customerCache')) { customerCache = CacheFactory('customerCache', { maxAge: 15 * 60 * 1000, // Items added to this cache expire after 15 minutes cacheFlushInterval: 60 * 60 * 1000, // This cache will clear itself every hour deleteOnExpire: 'aggressive' // Items will be deleted from this cache when they expire }); } else { customerCache = CacheFactory.get('customerCache'); }
this is how i do the put action:`var customerCache = CacheFactory.get('customerCache');
and here how i get my list:
var customerCache = CacheFactory.get('customerCache'); var deferred = $q.defer(); var start = new Date().getTime(); debugger $http.get('/Umbraco/Api/CustomerWebApi/getAllCustomerByUser', { cache: customerCache }).success(function (data) { console.log('time taken for request: ' + (new Date().getTime() - start) + 'ms'); deferred.resolve(data); }); return deferred.promise;
Why is the new inserted data not (visible) in the cach-object ?
The text was updated successfully, but these errors were encountered: