Skip to content

Misc wording/grammar improvements #13233

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

Merged
merged 1 commit into from
Feb 26, 2020
Merged
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
28 changes: 14 additions & 14 deletions cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Cache
=====

Using cache is a great way of making your application run quicker. The Symfony cache
component is shipped with many adapters to different storages. Every adapter is
Using a cache is a great way of making your application run quicker. The Symfony cache
component ships with many adapters to different storages. Every adapter is
developed for high performance.

The following example shows a typical usage of the cache::
Expand All @@ -27,7 +27,7 @@ The following example shows a typical usage of the cache::
// ... and to remove the cache key
$pool->delete('my_cache_key');

Symfony supports the Cache Contracts, PSR-6/16 and Doctrine Cache interfaces.
Symfony supports Cache Contracts, PSR-6/16 and Doctrine Cache interfaces.
You can read more about these at the :doc:`component documentation </components/cache>`.

.. versionadded:: 4.2
Expand All @@ -46,9 +46,9 @@ of:
This is a service that you will interact with. Each pool will always have
its own namespace and cache items. There is never a conflict between pools.
**Adapter**
An adapter is a *template* that you use to create Pools.
An adapter is a *template* that you use to create pools.
**Provider**
A provider is a service that some adapters are using to connect to the storage.
A provider is a service that some adapters use to connect to the storage.
Redis and Memcached are example of such adapters. If a DSN is used as the
provider then a service is automatically created.

Expand Down Expand Up @@ -108,7 +108,7 @@ The Cache component comes with a series of adapters pre-configured:
* :doc:`cache.adapter.redis </components/cache/adapters/redis_adapter>`

Some of these adapters could be configured via shortcuts. Using these shortcuts
will create pool with service id of ``cache.[type]``
will create pools with service IDs that follow the pattern ``cache.[type]``.

.. configuration-block::

Expand Down Expand Up @@ -302,13 +302,13 @@ You can also create more customized pools:
],
]);

Each pool manages a set of independent cache keys: keys of different pools
Each pool manages a set of independent cache keys: keys from different pools
*never* collide, even if they share the same backend. This is achieved by prefixing
keys with a namespace that's generated by hashing the name of the pool, the name
of the compiled container class and a :ref:`configurable seed<reference-cache-prefix-seed>`
that defaults to the project directory.

Each custom pool becomes a service where the service id is the name of the pool
Each custom pool becomes a service whose service ID is the name of the pool
(e.g. ``custom_thing.cache``). An autowiring alias is also created for each pool
using the camel case version of its name - e.g. ``custom_thing.cache`` can be
injected automatically by naming the argument ``$customThingCache`` and type-hinting it
Expand All @@ -334,7 +334,7 @@ Custom Provider Options

Some providers have specific options that can be configured. The
:doc:`RedisAdapter </components/cache/adapters/redis_adapter>` allows you to
create providers with option ``timeout``, ``retry_interval``. etc. To use these
create providers with the options ``timeout``, ``retry_interval``. etc. To use these
options with non-default values you need to create your own ``\Redis`` provider
and use that when configuring the pool.

Expand Down Expand Up @@ -426,7 +426,7 @@ item in a cache chain, Symfony stores it in all pools sequentially. When
retrieving an item, Symfony tries to get it from the first pool. If it's not
found, it tries the next pools until the item is found or an exception is thrown.
Because of this behavior, it's recommended to define the adapters in the chain
in order from the fastest to the slowest.
in order from fastest to slowest.

If an error happens when storing an item in a pool, Symfony stores it in the
other pools and no exception is thrown. Later, when the item is retrieved,
Expand Down Expand Up @@ -494,9 +494,9 @@ Using Cache Tags
----------------

In applications with many cache keys it could be useful to organize the data stored
to be able to invalidate the cache more efficient. One way to achieve that is to
to be able to invalidate the cache more efficiently. One way to achieve that is to
use cache tags. One or more tags could be added to the cache item. All items with
the same key could be invalidate with one function call::
the same key could be invalidated with one function call::

use Symfony\Contracts\Cache\ItemInterface;
use Symfony\Contracts\Cache\TagAwareCacheInterface;
Expand Down Expand Up @@ -644,14 +644,14 @@ Clearing the Cache

To clear the cache you can use the ``bin/console cache:pool:clear [pool]`` command.
That will remove all the entries from your storage and you will have to recalculate
all values. You can also group your pools into "cache clearers". There are 3 cache
all the values. You can also group your pools into "cache clearers". There are 3 cache
clearers by default:

* ``cache.global_clearer``
* ``cache.system_clearer``
* ``cache.app_clearer``

The global clearer clears all the cache in every pool. The system cache clearer
The global clearer clears all the cache items in every pool. The system cache clearer
is used in the ``bin/console cache:clear`` command. The app clearer is the default
clearer.

Expand Down