original_string: public static function invalidate_by_definition($component, $area, array $identifiers = array(), $keys = array()) {
          $cache = cache::make($component, $area, $identifiers);
          if (is_array($keys)) {
              $cache->delete_many($keys);
          } else if (is_scalar($keys)) {
              $cache->delete($keys);
          } else {
              throw new coding_exception('cache_helper::invalidate_by_definition only accepts $keys as array, or scalar.');
          }
          return true;
      }
code: public static function invalidate_by_definition($component, $area, array $identifiers = array(), $keys = array()) {
          $cache = cache::make($component, $area, $identifiers);
          if (is_array($keys)) {
              $cache->delete_many($keys);
          } else if (is_scalar($keys)) {
              $cache->delete($keys);
          } else {
              throw new coding_exception('cache_helper::invalidate_by_definition only accepts $keys as array, or scalar.');
          }
          return true;
      }
code_tokens: public static function invalidate_by_definition ( $ component , $ area , array $ identifiers = array ( ) , $ keys = array ( ) ) { $ cache = cache :: make ( $ component , $ area , $ identifiers ) ; if ( is_array ( $ keys ) ) { $ cache -> delete_many ( $ keys ) ; } else if ( is_scalar ( $ keys ) ) { $ cache -> delete ( $ keys ) ; } else { throw new coding_exception ( 'cache_helper::invalidate_by_definition only accepts $keys as array, or scalar.' ) ; } return true ; }
docstring: Invalidates a given set of keys from a given definition.
  
  @todo Invalidating by definition should also add to the event cache so that sessions can be invalidated (when required).
  
  @param string $component
  @param string $area
  @param array $identifiers
  @param array $keys
  @return boolean
docstring_tokens: Invalidates a given set of keys from a given definition .