@@ -50,6 +50,35 @@ angular.module('myApp', ['angular-cache'])
50
50
});
51
51
```
52
52
53
+ #### Why would you want to replace $cacheFactory?
54
+
55
+ | Feature | $cacheFactory | angular-cache |
56
+ | ----------- | ------------------- | --------------- |
57
+ | core implementation usable outside of Angular | no | [ __ yes__ ] ( https://github.com/jmdobry/CacheFactory ) |
58
+ | key/value store | __ yes__ | __ yes__ |
59
+ | in-memory support | __ yes__ | __ yes__ |
60
+ | localStorage support | no | __ yes__ |
61
+ | sessionStorage support | no | __ yes__ |
62
+ | custom storage support | no | __ yes__ |
63
+ | can set maximum capacity | __ yes__ | __ yes__ |
64
+ | LRU support | __ yes__ | __ yes__ |
65
+ | support for time-based expiration of items | no | __ yes__ |
66
+ | remove all expired items | n/a | __ yes__ |
67
+ | "touch" an item | n/a | __ yes__ |
68
+ | execute callback when an item expires | n/a | __ yes__ |
69
+ | get info about cache | __ yes__ | __ yes__ |
70
+ | get info about single item | no | __ yes__ |
71
+ | get item by key | __ yes__ | __ yes__ |
72
+ | remove item by key | __ yes__ | __ yes__ |
73
+ | remove all items | __ yes__ | __ yes__ |
74
+ | get keys of all caches | no | __ yes__ |
75
+ | clear all caches | no | __ yes__ |
76
+ | disable/enable a cache | no | __ yes__ |
77
+ | "touch" all items in all caches | n/a | __ yes__ |
78
+ | remove expired items from all caches | n/a | __ yes__ |
79
+ | get all keys in a cache | no | __ yes__ |
80
+ | clear a cache on a given interval | no | __ yes__ |
81
+
53
82
### The Basics
54
83
55
84
First, inject ` CacheFactory ` then create a cache. Let's go:
@@ -582,6 +611,10 @@ Enable the cache.
582
611
583
612
Disable the cache.
584
613
614
+ ##### ` Cache#values() `
615
+
616
+ Return all values in the cache.
617
+
585
618
##### ` Cache#touch([key]) `
586
619
587
620
` Cache#touch() ` will "touch" all items in the cache.
@@ -622,7 +655,7 @@ Set multiple options for the cache at a time. Setting `strict` to `true` will re
622
655
### License
623
656
[ MIT License] ( https://github.com/jmdobry/angular-cache/blob/master/LICENSE )
624
657
625
- Copyright (C) 2013-2015 Jason Dobry
658
+ Copyright (C) 2013-2016 Jason Dobry
626
659
627
660
Permission is hereby granted, free of charge, to any person obtaining a copy of
628
661
this software and associated documentation files (the "Software"), to deal in
0 commit comments