angular-cache is a very useful replacement for Angular's $cacheFactory.
Questions tagged [angular-cache]
35 questions
39
votes
2 answers
Clear angular cache in .angular folder
From version 13.0.0 there will be a .angular folder generated in root which is ignored by git containing a cache folder which caches builds.
How can I remove (or clear) this cache?

Mahdi Zarei
- 5,644
- 7
- 24
- 54
8
votes
1 answer
angular-cache not working as expected
I was trying to use angular-cache module into my project but not sure it is working properly or not. Below is the code –
angular.module('TrackerApp').factory('TrackerFactory', function ($resource, CacheFactory) {
if…

sunder
- 1,803
- 4
- 29
- 50
6
votes
1 answer
Cache busting is not working sometimes after production build in angular 7
Our app uses the node.js Core & Angular version 7.2
We are frequently rollout production build of the Angular app to deploy the changes 3-4 times in a month.
I have received some client's complaints who are unable to see changes unless they clear…

Nikunj Beladiya
- 159
- 1
- 8
6
votes
3 answers
Cancelling GET Request to server using Restangular
I have create a UserService as follows:
angular.module('nrApp').factory('userService', ['Restangular', 'UserModel', 'DSCacheFactory', function (Restangular, UserModel, DSCacheFactory) {
// Create a new cache called "profileCache"
var…

Adrian Bonnici
- 283
- 4
- 14
3
votes
1 answer
When using angular-cache is there any advantage to using the Angular LocalStorageModule?
The angular-cache can be set up like this:
app.service('myService', function ($angularCacheFactory) {
// This cache will sync itself with localStorage if it exists, otherwise it won't. Every time the
// browser loads this app, this cache…

Samantha J T Star
- 30,952
- 84
- 245
- 427
2
votes
0 answers
Is there a way to clear the service worker's cache at runtime in Angular 14?
I am using service worker to cache lookups in my Angular 14 PWA application and everything is working fine.
However, the admin in the application has the permission to add/remove lookups options which is causing me the issue.
Upon changing the…

Jad
- 29
- 3
2
votes
1 answer
Using karma, angular-cache and the beforeEach Fn
Good morning
I am trying to test our relatively big angular app with karma (or at least start with some tests). I got it to run with some minor troubles but am wondering now; karma offers a beforeEach function, which is called before every it code…

mambax
- 1,079
- 8
- 17
2
votes
3 answers
Angular default $http cache removes after route change
I am using Angular's default $http cache in one of my services. When the user navigates from a view to another one (I am using ui-router), the cache invalidates and all of the items will be removed from it. I want to not invalidate the cache in the…

alisabzevari
- 8,008
- 6
- 43
- 67
2
votes
0 answers
How to refresh Angular $http cache?
My service populates all items using $http and a cache when the controller is activated. If I create a new item, by doing an $http.post(), what is the best way to refresh the cache?
The problem with the example below is the cached getAll call will…

G. Deward
- 1,542
- 3
- 17
- 30
2
votes
2 answers
How $templateCache works?
I'm a little confuse with the $templateCache resources;
the html/template will be stored on the server-side ?
Or will be stored on browser memory ? If so what's the memory limits?

Alvaro Silvino
- 9,441
- 12
- 52
- 80
2
votes
1 answer
AngularJs http get cache not working
Working on this app:
https://billiving-qa.azurewebsites.net/spa1/#/invoices
Some http calls should be cached, but for some reason this isn't working:
function getStatuses() {
return $http.get('/v1/definitions/status', { cache: true })
…

Josh
- 189
- 1
- 12
2
votes
1 answer
Cache compiled template of an AngularJS directive
I have a directive with a template that has many ngRepeat and take some time to render and I'm ok with it. But the problem is that I'm calling this directive more than one time in the same view. So it's causing a lot freeze and performance issue…

Sn0opr
- 1,016
- 2
- 12
- 38
2
votes
1 answer
How can I use angular-cache in conjunction with the AngularJS LocalStorageModule
I have an application that when it starts gets a list of admin users.
The data looks something like this:
var users…

Samantha J T Star
- 30,952
- 84
- 245
- 427
1
vote
1 answer
Best approach to implement cache in Angular App
What is the best approach to implement cache in angular App?
I found two different way:
- First one is to create a simple service like CacheService and do there necessary logic.
- Second option is to create a HttpInterceptor and catch each request…

Kacper O
- 13
- 4
1
vote
2 answers
Angular JS - Using Services For Holding\Sharing Data
I'm working on some Angular JS SPA .
I'm trying to understand if from architecture perspective it is correct to use angular services for holding\sharing data between views or should I use some caching mechanism.
My need is to hold and share any REST…

Amir_Af
- 576
- 6
- 22