interface ImmutableInvalidationInterface in Purge 8.3
Describes the immutable invalidation.
Immutable invalidations are not used in real-life cache invalidation, as \Drupal\purge\Plugin\Purge\Purger\PurgersServiceInterface doesn't accept them. However, as they are read-only, they are used by user interfaces to see what is in the queue without actually claiming or changing it.
Hierarchy
- interface \Drupal\purge\Plugin\Purge\Invalidation\InvStatesInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidationInterface
 
 
Expanded class hierarchy of ImmutableInvalidationInterface
All classes that implement ImmutableInvalidationInterface
1 file declares its use of ImmutableInvalidationInterface
- PluginTestBase.php in tests/
src/ Kernel/ Invalidation/ PluginTestBase.php  
File
- src/
Plugin/ Purge/ Invalidation/ ImmutableInvalidationInterface.php, line 15  
Namespace
Drupal\purge\Plugin\Purge\InvalidationView source
interface ImmutableInvalidationInterface extends InvStatesInterface, PluginInspectionInterface {
  /**
   * Return the string expression of the invalidation.
   *
   * @return string
   *   Returns the string serialization, e.g. "node/1".
   */
  public function __toString();
  /**
   * Get the invalidation expression.
   *
   * @return mixed|null
   *   Mixed expression (or NULL) that describes what needs to be invalidated.
   */
  public function getExpression();
  /**
   * Get all stored properties.
   *
   * @throws \LogicException
   *   Thrown when NOT operating in general context.
   *
   * @return array[]
   *   Associative array in which the keys point to purger instances and where
   *   each value represents a associative array with key-value stored metadata.
   */
  public function getProperties();
  /**
   * Retrieve a purger specific property value.
   *
   * Once ::setStateContext() has been called, purgers can call ::setProperty()
   * and ::getProperty() to store specific metadata on the invalidation. The
   * most common usecase for setting properties is for multi-step cache
   * invalidation, for instance CDNs returning IDs to check against later.
   *
   * @param string $key
   *   The key of the stored property, unique to the current purger context.
   *
   * @throws \LogicException
   *   Thrown when operating in general context, call ::setStateContext() first.
   *
   * @return null|mixed
   *   The property value or NULL when no such property exists.
   */
  public function getProperty($key);
  /**
   * Get the current or general state of the invalidation.
   *
   * New, freshly claimed invalidations and those exiting the PurgersService
   * always have NULL as their state context. This means that when called,
   * ::getState() resolves the general state by triaging all stored states. So
   * for example: when no states are known, it will evaluate to FRESH but when
   * one state is set to SUCCEEDED and a few others to FAILED, the general state
   * becomes FAILED. When only SUCCEEDED's is stored, it will evaluate as such.
   *
   * However, the behaviors of ::getState() and ::setState() change after a call
   * to ::setStateContext(). From this point on, both will respectively retrieve
   * and store the state *specific* to that purger context. Context switching is
   * handled by PurgersServiceInterface::invalidate() and therefore no
   * understanding of this concept is required outside the purgers service code.
   *
   * @throws \LogicException
   *   Thrown state are stored that should not have been stored, as is not
   *   never supposed to happen catching this exception is not recommended.
   *
   * @return int
   *   Any \Drupal\purge\Plugin\Purge\Invalidation\InvStatesInterface constant.
   */
  public function getState();
  /**
   * Get all stored state contexts.
   *
   * @throws \LogicException
   *   Thrown when NOT operating in general context.
   *
   * @return string[]
   *   Non-associative list of stored state contexts.
   */
  public function getStateContexts();
  /**
   * Get all invalidation states.
   *
   * @return int[]
   *   Associative list of which the keys refer to purger instances and the
   *   values from \Drupal\purge\Plugin\Purge\Invalidation\InvStatesInterface.
   */
  public function getStates();
  /**
   * Get the current state as string.
   *
   * @return string
   *   A capitalized string exactly matching the names of the constants in
   *   \Drupal\purge\Plugin\Purge\Invalidation\InvStatesInterface.
   */
  public function getStateString();
  /**
   * Get the current state as user translated string.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup
   *   The translated string describing the current state of the invalidation.
   */
  public function getStateStringTranslated();
  /**
   * Get the type of invalidation.
   *
   * @return string
   *   The plugin ID of the invalidation.
   */
  public function getType();
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get the invalidation expression. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get all stored properties. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Retrieve a purger specific property value. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get the current or general state of the invalidation. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get all stored state contexts. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get all invalidation states. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get the current state as string. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get the current state as user translated string. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Get the type of invalidation. | 1 | 
| 
            ImmutableInvalidationInterface:: | 
                  public | function | Return the string expression of the invalidation. | 1 | 
| 
            InvStatesInterface:: | 
                  constant | The invalidation failed and will be offered again later. | ||
| 
            InvStatesInterface:: | 
                  constant | Invalidation is new and no processing has been attempted on it yet. | ||
| 
            InvStatesInterface:: | 
                  constant | The type of invalidation isn't supported and will be offered again later. | ||
| 
            InvStatesInterface:: | 
                  constant | The invalidation is processing. | ||
| 
            InvStatesInterface:: | 
                  constant | The invalidation succeeded. | ||
| 
            PluginInspectionInterface:: | 
                  public | function | Gets the definition of the plugin implementation. | 4 | 
| 
            PluginInspectionInterface:: | 
                  public | function | Gets the plugin_id of the plugin instance. | 2 |