Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Cache #1430

Merged
merged 1 commit into from
Jul 8, 2022
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
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,12 @@
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.16",
"psalm/plugin-symfony": "^3.0",
"sonata-project/cache": "^2.0",
"sonata-project/cache-bundle": "^3.3",
"symfony/browser-kit": "^4.4",
"symfony/css-selector": "^4.4",
"symfony/phpunit-bridge": "^5.1.4",
"vimeo/psalm": "^4.7.2"
},
"conflict": {
"sonata-project/cache": "<2.0",
"sonata-project/cache-bundle": "<3.3",
"sonata-project/core-bundle": "<3.20"
},
"suggest": {
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Page Bundle
reference/advanced_usage
reference/page_services
reference/advanced_configuration
reference/varnish
reference/performance
reference/api
reference/assets
24 changes: 0 additions & 24 deletions docs/reference/advanced_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,11 @@ Full configuration options:
- /(.*)admin(.*)/
- /^_(.*)/
slugify_service: sonata.core.slugify.native
ignore_routes:

# Defaults:
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_js_async
- sonata_cache_js_sync
- sonata_cache_apc
ignore_uri_patterns:

# Default:
- /admin(.*)/
cache_invalidation:
service: sonata.cache.invalidation.simple
recorder: sonata.cache.recorder
classes:

# Prototype
id: ~
default_page_service: sonata.page.service.default
default_template: ~ # Required
assets:
Expand Down Expand Up @@ -100,13 +83,6 @@ Full configuration options:
id:
decorate: true
enabled: true
caches:
esi:
token: 4b8fa46a0a00d0297e0b39b71aaeaa56cc2c40e3083642a720f940e9cf4ee718
version: 2
servers: []
ssi:
token: adcd02dc23d9da234436d44b1ec58d147f86db2a08b94b872d969ce48687c386
catch_exceptions:

# Prototype
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ Key Description
- (.*)admin(.*) # ignore admin route, i.e. route containing 'admin'
- ^_(.*) # ignore symfony routes

ignore_routes:
- sonata_page_cache_esi
- sonata_page_cache_ssi

ignore_uri_patterns:
- ^/admin\/ # ignore admin route, i.e. route containing 'admin'

Expand Down
13 changes: 0 additions & 13 deletions docs/reference/command_line.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
Command Line Tools
==================

Flush commands
--------------

- Flush cache elements matching the key ``block_id = 5``::

bin/console sonata:cache:flush --keys='{"block_id":5}'

- Flush all cache elements::

bin/console sonata:cache:flush-all

For more information about this, please have a look at the `SonataCacheBundle documentation`_.

Page commands
-------------

Expand Down
16 changes: 0 additions & 16 deletions docs/reference/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Required dependencies:

* `SonataAdminBundle <https://docs.sonata-project.org/projects/SonataAdminBundle/en/3.x/>`_
* `SonataBlockBundle_ <https://docs.sonata-project.org/projects/SonataBlockBundle/en/3.x/>`_
* `SonataCacheBundle_ <https://docs.sonata-project.org/projects/SonataCacheBundle/en/3.x/>`_
* `SonataSeoBundle_ <https://docs.sonata-project.org/projects/SonataSeoBundle/en/2.x/>`_
* `SonataNotificationBundle_ <https://docs.sonata-project.org/projects/SonataNotificationBundle/en/3.x/>`_

Expand Down Expand Up @@ -111,17 +110,6 @@ SonataPageBundle Configuration
block: App\Entity\SonataPageBlock
site: App\Entity\SonataPageSite

ignore_routes:
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_ssi
- sonata_cache_js_async
- sonata_cache_js_sync
- sonata_cache_apc

ignore_uri_patterns:
- ^/admin\/ # ignore admin route, ie route containing 'admin'

Expand Down Expand Up @@ -209,10 +197,6 @@ Routing Configuration
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml'
prefix: /

sonata_page_cache:
resource: '@SonataPageBundle/Resources/config/routing/cache.xml'
prefix: /

Doctrine ORM Configuration
--------------------------

Expand Down
16 changes: 0 additions & 16 deletions docs/reference/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,3 @@ A ``Snapshot`` is a version of a ``Page`` used to render the page to the final u
So when an editor organizes ``Page`` and ``Block`` the final user does not see these
modifications unless the editor creates a new snapshot of the page.

A Cache
-------

There is a cache mechanism integrated into the bundle. Each block service is linked
to a cache service.

Depending on the block logic some cache backends are more suitable than others:

- Container should use the ``sonata.page.cache.esi`` cache
- Users related block like basket summary or authentication area should
use the ``sonata.page.cache.js_async`` cache.

Of course if you don't have a reverse proxy server you can use other caching
solution such as memcached, mongo or apc.

The ``sonata.cache.noop`` cache can be use if you don't want caching!
Loading