Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache
The Cache class handles the @Cache annotation parts.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Cache
extends ConfigurationAnnotation
{
- // members
- protected string $expires;
- protected integer $maxage;
- protected integer $smaxage;
- protected integer $public;
- protected array $vary;
- // methods
- public string getExpires()
- public void setExpires()
- public void setMaxAge()
- public integer getMaxAge()
- public void setSMaxAge()
- public integer getSMaxAge()
- public Boolean isPublic()
- public void setPublic()
- public array getVary()
- public void setVary()
- public string getAliasName()
- public Boolean allowArray()
- // Inherited methods from ConfigurationAnnotation
- public void __construct()
Hierarchy
Members
protected
- $expires
—
string
The expiration date as a valid date for the strtotime() function. - $maxage
—
integer
The number of seconds that the response is considered fresh by a private cache like a web browser. - $public
—
integer
Whether or not the response is public or not. - $smaxage
—
integer
The number of seconds that the response is considered fresh by a public cache like a reverse proxy cache. - $vary
—
array
Additional "Vary:"-headers
Methods
public
- allowArray() — Only one cache directive is allowed
- getAliasName() — Returns the annotation alias name.
- getExpires() — Returns the expiration date for the Expires header field.
- getMaxAge() — Returns the number of seconds the response is considered fresh by a private cache.
- getSMaxAge() — Returns the number of seconds the response is considered fresh by a public cache.
- getVary() — Returns the custom "Vary"-headers
- isPublic() — Returns whether or not a response is public.
- setExpires() — Sets the expiration date for the Expires header field.
- setMaxAge() — Sets the number of seconds for the max-age cache-control header field.
- setPublic() — Sets a response public.
- setSMaxAge() — Sets the number of seconds for the s-maxage cache-control header field.
- setVary() — Add additional "Vary:"-headers