updateCache example

else {
      // If there is no runtime cache stored, fetch the full theme registry,       // but then initialize each value to NULL. This allows offsetExists()       // to function correctly on non-registered theme hooks without triggering       // a call to resolveCacheMiss().       $this->storage = $this->initializeRegistry();
      foreach (array_keys($this->storage) as $key) {
        $this->persist($key);
      }
      // RegistryTest::testRaceCondition() ensures that the cache entry is       // written on the initial construction of the theme registry.       $this->updateCache();
    }
  }

  /** * Initializes the full theme registry. * * @return array * An array with the keys of the full theme registry, but the values * initialized to NULL. */
  public function initializeRegistry() {
    
Cache::invalidateTags($this->tags);
    }
    else {
      $this->cache->delete($this->getCid());
    }
  }

  /** * {@inheritdoc} */
  public function destruct() {
    $this->updateCache();
  }

  /** * Loads the cache if not already done. */
  protected function lazyLoadCache() {
    if ($this->cacheLoaded) {
      return;
    }
    // The cache was not yet loaded, set flag to TRUE.     $this->cacheLoaded = TRUE;

    
Home | Imprint | This part of the site doesn't use cookies.