Commit 0dac3026 authored by Markus Kalkbrenner's avatar Markus Kalkbrenner Committed by Markus Kalkbrenner
Browse files

Issue #3282075 by mkalkbrenner: Dispatch an event to adjust cacheable metadata...

Issue #3282075 by mkalkbrenner: Dispatch an event to adjust cacheable metadata after a facet is built
parent 3c4b657e
Loading
Loading
Loading
Loading
+6 −16
Original line number Diff line number Diff line
@@ -1096,24 +1096,14 @@ class Facet extends ConfigEntityBase implements FacetInterface {
  }

    /**
   * Set cache contexts.
   *
   * @param array $cacheContexts
   *   The cache contexts.
   *
   * @return void
     * {@inheritdoc}
     */
  public function setCacheContexts(array $cacheContexts): void {
     $this->cacheContexts = $cacheContexts;
  }

    /**
   * Set cache max age in seconds.
   *
   * @param int $cacheMaxAge
   *   Max age in seconds.
   *
   * @return void
     * {@inheritdoc}
     */
  public function setCacheMaxAge(int $cacheMaxAge): void {
    $this->cacheMaxAge = $cacheMaxAge;
+20 −0
Original line number Diff line number Diff line
@@ -504,4 +504,24 @@ interface FacetInterface extends ConfigEntityInterface {
   */
  public function getMinCount();

  /**
   * Set cache contexts.
   *
   * @param array $cacheContexts
   *   The cache contexts.
   *
   * @return void
   */
  public function setCacheContexts(array $cacheContexts): void;

  /**
   * Set cache max age in seconds.
   *
   * @param int $cacheMaxAge
   *   Max age in seconds.
   *
   * @return void
   */
  public function setCacheMaxAge(int $cacheMaxAge): void;

}