Details
-
Bug
-
Resolution: Cannot Reproduce
-
High
-
None
-
3.3.0-rc2
Description
It's not possible to set purge_server using environmental variables - the value is not properly passed and Varnish cache is not purged correctly.
Setup:
Project configured to use Varnish, Varnish running in the background.
Steps to reproduce:
1. Set purge_server using env variable, for example:
export HTTPCACHE_PURGE_SERVER=http://192.168.33.16
2. Login as admin
3. Create a new Folder named "TestFolder"
4. Visit the "TestFolder" item on the frontend a couple of times to make sure it's cached by Varnish
5. Edit the item in the admin panel - change the name to "TestFolderEdited"
6. Refresh the "TestFolder" on the frontend again
Expected:
Varnish cache is refreshed and "TestFolderEdited" is displayed
Actual:
Cache is not purged. "TestFolder" is still displayed.
If I set the SiteAccess configuration explicitly:
system: default: # Cache pool service, needs to be different per repository (database) on multi repository install. cache_service_name: '%cache_pool%' # These reflect the current installers, complete installation before you change them. For changing var_dir # it is recommended to install clean, then change setting before you start adding binary content, otherwise you'll # need to manually modify your database data to reflect this to avoid exceptions. var_dir: var/site content: # As we by default enable EzSystemsPlatformHttpCacheBundle which is designed to expire all affected cache # on changes, and as error / redirects now have separate ttl, we easier allow ttl to be greatly increased default_ttl: '%httpcache_default_ttl%' # HttpCache purge server(s) setting, eg Varnish, for when ezpublish.http_cache.purge_type is set to 'varnish'. http_cache: purge_servers: ['http://192.168.33.16'] varnish_invalidate_token: '%varnish_invalidate_token%'
then the purge_server value is correct and Varnish is purged correctly.