b13 / proxycachemanager
TYPO3 Extension that automatically flushes cached URLs within a proxy / CDN.
Installs: 58 686
Dependents: 0
Suggesters: 3
Security: 0
Stars: 10
Watchers: 13
Forks: 11
Open Issues: 1
Type:typo3-cms-extension
Requires
- php: ^8.1
- typo3/cms-backend: ^11.5 || ^12.4
- typo3/cms-frontend: ^11.5 || ^12.4
Requires (Dev)
- saschaegerer/phpstan-typo3: ^1.8
- typo3/coding-standards: ^0.7
- typo3/tailor: ^1.0
- dev-master
- v12.x-dev
- 4.0.1
- 4.0.0
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.0
- v3.2.0
- v3.1.0
- 3.0.1
- v3.0.0
- v2.2.0
- v2.1.0
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- dev-bugfix/cache-service
- dev-bugfix/avoid-invalidate
- dev-assetcollector
- dev-bugfix/php8-array-access
- dev-bugfix/image-urls
- dev-task/drop-v9-support
- dev-feature/add-ci
- dev-exceptions-cloudflare
- dev-bugfix/php8-issues
- dev-bugfix/flush-proxy-cache
- dev-bugfix/request-exception
- dev-feature/file-modifications
- dev-bugfix/guzzle-client
- dev-bugfix/url-parsing
This package is auto-updated.
Last update: 2024-10-13 11:22:43 UTC
README
This TYPO3 extension is a flexible and generic way to track the pages that are cached by a reverse proxy like nginx or varnish, or any useful CDN.
Currently supported backends / providers:
- Cloudflare CDN (https://packagist.org/packages/b13/cloudflare-cdn)
- Akamai CDN (https://packagist.org/packages/b13/akamai)
- Azure CDN (https://packagist.org/packages/b13/azure-purge)
What does it do?
By embracing TYPO3's Caching Framework this extension provides a new cache to track all pages outputted that are "cacheable". When an editor changes content on a page, the page cache needs to be cleared - and the CDN / reverse proxy needs to be informed that the cache is invalid. This is usually done via a HTTP PURGE request to the CDN / proxy server or a custom API.
The benefits for that are that the editor does not need to worry why out-of-date information is still visible on his/her website.
Requirements
- A TYPO3 setup (v11 LTS+) with cacheable content, see the "cacheinfo" extension for what can be tracked with HTTP caches.
- A CDN or Reverse Proxy (such as nginx or apache2)
Setup
Install the extension and make sure to enter the details about your proxy servers, otherwise the default (IENV:TYPO3_REV_PROXY
) is used.
Don't forget to set the according TYPO3 settings for using proxies, see $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP']
and $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyHeaderMultiValue']
.
Whenever a cacheable frontend page is now called, the full URL is stored in a cache called "tx_proxy" automatically (a derivative of the Typo3DatabaseBackend cache), tagged with the pageID. Whenever the cache is flushed, the database table is emptied completely, additionally, a HTTP PURGE call to the reverse proxy is made to empty all caches. If only a certain tag is removed, the PURGE call is made only to the relevant URLs that are stored in the cache.
Configuration
By default all administrators can flush the CDN caches via the toolbar on the top right corner of TYPO3's Backend.
To enable the button for non-admin editors, use this UserTsConfig option:
options.clearCache.proxy = 1
To explicitly disable the button for specific administrators, use this UserTsConfig option:
options.clearCache.proxy = 0
Credits
The extension was created taken all the great from Andreas Gellhaus, Tom RĂ¼ther into account, as well
as moc_varnish
and cacheinfo
as great work before.
Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.