Elgg\ViewsService::registerCacheableView PHP Method

registerCacheableView() public method

public registerCacheableView ( $view )
    public function registerCacheableView($view)
    {
        $view = $this->canonicalizeViewName($view);
        $this->simplecache_views[$view] = true;
    }

Usage Example

 public function testCanRegisterViewsAsCacheable()
 {
     $this->assertFalse($this->views->isCacheableView('js/interpreted.js'));
     $this->views->registerCacheableView('js/interpreted.js');
     $this->assertTrue($this->views->isCacheableView('js/interpreted.js'));
 }