csp = function() {
  if (!isDefined(csp.rules)) {


    var ngCspElement = (window.document.querySelector('[ng-csp]') ||
                    window.document.querySelector('[data-ng-csp]'));

    if (ngCspElement) {
      var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
                    ngCspElement.getAttribute('data-ng-csp');
      csp.rules = {
        noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
        noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
      };
    } else {
      csp.rules = {
        noUnsafeEval: noUnsafeEval(),
        noInlineStyle: false
      };
    }
  }

  return csp.rules;

  function noUnsafeEval() {
    try {
      // eslint-disable-next-line no-new, no-new-func
      new Function('');
      return false;
    } catch (e) {
      return true;
    }
  }
}
@ngdoc type
@name $cacheFactory.Cache

@description
A cache object used to store and retrieve data, primarily used by
{@link $templateRequest $templateRequest} and the {@link ng.directive:script script}
directive to cache templates and other data.

```js
 angular.module('superCache')
   .factory('superCache', ['$cacheFactory', function($cacheFactory) {
     return $cacheFactory('super-cache');
   }]);
```

Example test:

```js
 it('should behave like a cache', inject(function(superCache) {
   superCache.put('key', 'value');
   superCache.put('another key', 'another value');

   expect(superCache.info()).toEqual({
     id: 'super-cache',
     size: 2
   });

   superCache.remove('another key');
   expect(superCache.get('another key')).toBeUndefined();

   superCache.removeAll();
   expect(superCache.info()).toEqual({
     id: 'super-cache',
     size: 0
   });
 }));
```