Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ variables or in a `.env` file, see `.env.example`:
cp .env.example .env
```

Note: if you change anything to the `create_site.py` script, you must remove the
`matomoaitracker-plone` image, otherwise this has no effect.

Simulate an AI chatbot visit, and see what reached the fake Matomo a few seconds
later:

Expand Down
4 changes: 4 additions & 0 deletions scripts/create_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def asbool(s):
installer = get_installer(site)
if not installer.is_product_installed("plone.app.caching"):
installer.install_product("plone.app.caching")
# Apply the with-caching-proxy settings.
site.portal_setup.runAllImportStepsFromProfile(
"profile-plone.app.caching:with-caching-proxy"
)
site.portal_setup.upgradeProfile("plone.app.caching:default")
prefix = "plone.cachepurging.interfaces.ICachePurgingSettings"
registry[f"{prefix}.enabled"] = True
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/stack/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def caching_policy(request, stack):
if request.param == "moderate":
original_mapping = stack.registry_get(OPERATION_MAPPING)
original_smaxage = stack.registry_get(MODERATE_SMAXAGE)
mapping = dict(original_mapping)
mapping = dict(original_mapping) if original_mapping is not None else {}
for rule in ("plone.content.folderView", "plone.content.itemView"):
mapping[rule] = "plone.app.caching.moderateCaching"
stack.registry_set({OPERATION_MAPPING: mapping, MODERATE_SMAXAGE: SMAXAGE})
Expand Down
Loading