mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-18 06:55:20 +02:00
More PSR4 rewriting
This commit is contained in:
@@ -5,8 +5,8 @@ This is the length of time in seconds that a template cache is valid.
|
||||
Once this time has expired, the cache will be regenerated.
|
||||
|
||||
- `$caching` must be turned on (either
|
||||
Smarty::CACHING\_LIFETIME\_CURRENT or
|
||||
Smarty::CACHING\_LIFETIME\_SAVED) for `$cache_lifetime` to have any
|
||||
\Smarty\Smarty::CACHING\_LIFETIME\_CURRENT or
|
||||
\Smarty\Smarty::CACHING\_LIFETIME\_SAVED) for `$cache_lifetime` to have any
|
||||
purpose.
|
||||
|
||||
- A `$cache_lifetime` value of -1 will force the cache to never
|
||||
@@ -14,11 +14,11 @@ Once this time has expired, the cache will be regenerated.
|
||||
|
||||
- A value of 0 will cause the cache to always regenerate (good for
|
||||
testing only, to disable caching a more efficient method is to set
|
||||
[`$caching`](#variable.caching) = Smarty::CACHING\_OFF).
|
||||
[`$caching`](#variable.caching) = \Smarty\Smarty::CACHING\_OFF).
|
||||
|
||||
- If you want to give certain templates their own cache lifetime, you
|
||||
could do this by setting [`$caching`](#variable.caching) =
|
||||
Smarty::CACHING\_LIFETIME\_SAVED, then set `$cache_lifetime` to a
|
||||
\Smarty\Smarty::CACHING\_LIFETIME\_SAVED, then set `$cache_lifetime` to a
|
||||
unique value just before calling [`display()`](#api.display) or
|
||||
[`fetch()`](#api.fetch).
|
||||
|
||||
|
@@ -3,21 +3,21 @@
|
||||
|
||||
This tells Smarty whether or not to cache the output of the templates to
|
||||
the [`$cache_dir`](#variable.cache.dir). By default this is set to the
|
||||
constant Smarty::CACHING\_OFF. If your templates consistently generate
|
||||
constant \Smarty\Smarty::CACHING\_OFF. If your templates consistently generate
|
||||
the same content, it is advisable to turn on `$caching`, as this may
|
||||
result in significant performance gains.
|
||||
|
||||
You can also have [multiple](#caching.multiple.caches) caches for the
|
||||
same template.
|
||||
|
||||
- A constant value of Smarty::CACHING\_LIFETIME\_CURRENT or
|
||||
Smarty::CACHING\_LIFETIME\_SAVED enables caching.
|
||||
- A constant value of \Smarty\Smarty::CACHING\_LIFETIME\_CURRENT or
|
||||
\Smarty\Smarty ::CACHING\_LIFETIME\_SAVED enables caching.
|
||||
|
||||
- A value of Smarty::CACHING\_LIFETIME\_CURRENT tells Smarty to use
|
||||
- A value of \Smarty\Smarty::CACHING\_LIFETIME\_CURRENT tells Smarty to use
|
||||
the current [`$cache_lifetime`](#variable.cache.lifetime) variable
|
||||
to determine if the cache has expired.
|
||||
|
||||
- A value of Smarty::CACHING\_LIFETIME\_SAVED tells Smarty to use the
|
||||
- A value of \Smarty\Smarty::CACHING\_LIFETIME\_SAVED tells Smarty to use the
|
||||
[`$cache_lifetime`](#variable.cache.lifetime) value at the time the
|
||||
cache was generated. This way you can set the
|
||||
[`$cache_lifetime`](#variable.cache.lifetime) just before
|
||||
|
@@ -18,7 +18,7 @@ enabled, then the cache files will get regenerated if an involved
|
||||
template file or config file was updated.
|
||||
|
||||
As of Smarty 3.1 `$compile_check` can be set to the value
|
||||
`Smarty::COMPILECHECK_CACHEMISS`. This enables Smarty to revalidate the
|
||||
`\Smarty\Smarty::COMPILECHECK_CACHEMISS`. This enables Smarty to revalidate the
|
||||
compiled template, once a cache file is regenerated. So if there was a
|
||||
cached template, but it\'s expired, Smarty will run a single
|
||||
compile\_check before regenerating the cache.
|
||||
|
@@ -7,7 +7,7 @@ When this value is set to a non-null-value it\'s value is used as php\'s
|
||||
|
||||
Smarty 3.1.2 introduced the
|
||||
[`muteExpectedErrors()`](#api.mute.expected.errors) function. Calling
|
||||
`Smarty::muteExpectedErrors();` after setting up custom error handling
|
||||
`\Smarty\Smarty::muteExpectedErrors();` after setting up custom error handling
|
||||
will ensure that warnings and notices (deliberately) produced by Smarty
|
||||
will not be passed to other custom error handlers. If your error logs
|
||||
are filling up with warnings regarding `filemtime()` or `unlink()`
|
||||
|
Reference in New Issue
Block a user