Drupal 8  8.0.2
DynamicPageCacheTestController Class Reference

Public Member Functions

 response ()
 
 cacheableResponse ()
 
 html ()
 
 htmlWithCacheContexts (Request $request)
 
 htmlUncacheableMaxAge ()
 
 htmlUncacheableContexts ()
 
 htmlUncacheableTags ()
 

Detailed Description

Controller routines for dynamic_page_cache_test routes.

Member Function Documentation

cacheableResponse ( )

A route returning a CacheableResponse object.

Returns
A CacheableResponseInterface object.

References Entity\load().

Here is the call graph for this function:

html ( )

A route returning a render array (without cache contexts, so cacheable).

Returns
array A render array.

Referenced by DynamicPageCacheTestController\htmlUncacheableContexts(), DynamicPageCacheTestController\htmlUncacheableMaxAge(), DynamicPageCacheTestController\htmlUncacheableTags(), and DynamicPageCacheTestController\htmlWithCacheContexts().

Here is the caller graph for this function:

htmlUncacheableContexts ( )

A route returning a render array (with 'user' context, so uncacheable)

Returns
array A render array.
See Also
html()

References Drupal\currentUser(), DynamicPageCacheTestController\html(), and t().

Here is the call graph for this function:

htmlUncacheableMaxAge ( )

A route returning a render array (with max-age=0, so uncacheable)

Returns
array A render array.
See Also
html()

References DynamicPageCacheTestController\html().

Here is the call graph for this function:

htmlUncacheableTags ( )

A route returning a render array (with a cache tag preventing caching).

Returns
array A render array.
See Also
html()

References DynamicPageCacheTestController\html().

Here is the call graph for this function:

htmlWithCacheContexts ( Request  $request)

A route returning a render array (with cache contexts, so cacheable).

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe current request.
Returns
array A render array.
See Also
html()

References DynamicPageCacheTestController\html(), and t().

Here is the call graph for this function:

response ( )

A route returning a Response object.

Returns
A Response object.

The documentation for this class was generated from the following file: