| 690 | } |
| 691 | |
| 692 | function createLocalCacheLookup() { |
| 693 | var cache = Object.create(null); |
| 694 | return { |
| 695 | flush: function() { |
| 696 | cache = Object.create(null); |
| 697 | }, |
| 698 | |
| 699 | count: function(key) { |
| 700 | var entry = cache[key]; |
| 701 | return entry ? entry.total : 0; |
| 702 | }, |
| 703 | |
| 704 | get: function(key) { |
| 705 | var entry = cache[key]; |
| 706 | return entry && entry.value; |
| 707 | }, |
| 708 | |
| 709 | put: function(key, value) { |
| 710 | if (!cache[key]) { |
| 711 | cache[key] = { total: 1, value: value }; |
| 712 | } else { |
| 713 | cache[key].total++; |
| 714 | } |
| 715 | } |
| 716 | }; |
| 717 | } |
| 718 | |
| 719 | var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { |
| 720 | var gcsLookup = createLocalCacheLookup(); |