Skip to content

Commit

Permalink
Merge pull request codeigniter4#8846 from obozdag/patch-10
Browse files Browse the repository at this point in the history
docs: Fix typos in libraries/caching.rst
  • Loading branch information
kenjis authored May 31, 2024
2 parents f37e326 + 6b0dfb1 commit 7af34e5
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions user_guide_src/source/libraries/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ to projects and modules. This will replace the hard-coded value in a future rele
$file
=====

This is an array of settings specific to the ``File`` handler to determine how it should save the cache files.
This is an array of settings specific to the **File** handler to determine how it should save the cache files.

$memcached
==========

This is an array of servers that will be used when using the ``Memcache(d)`` handler.
This is an array of servers that will be used when using the **Memcached** handler.

$redis
======

The settings for the Redis server that you wish to use when using the ``Redis`` and ``Predis`` handler.
The settings for the Redis server that you wish to use when using the **Redis** and **Predis** handler.

******************
Command-Line Tools
Expand Down Expand Up @@ -139,12 +139,11 @@ Class Reference
Gets an item from the cache. If ``null`` was returned, this will invoke the callback
and save the result. Either way, this will return the value.

.. php:method:: save(string $key, $data[, int $ttl = 60[, $raw = false]])
.. php:method:: save(string $key, $data[, int $ttl = 60])
:param string $key: Cache item name
:param mixed $data: the data to save
:param int $ttl: Time To Live, in seconds (default 60)
:param bool $raw: Whether to store the raw value
:returns: ``true`` on success, ``false`` on failure
:rtype: bool

Expand All @@ -155,9 +154,6 @@ Class Reference

.. literalinclude:: caching/004.php

.. note:: The ``$raw`` parameter is only utilized by Memcache,
in order to allow usage of ``increment()`` and ``decrement()``.

.. php:method:: delete($key): bool
:param string $key: name of cached item
Expand Down Expand Up @@ -280,11 +276,10 @@ Drivers
File-based Caching
==================

Unlike caching from the Output Class, the driver file-based caching
allows for pieces of view files to be cached. Use this with care, and
make sure to benchmark your application, as a point can come where disk
I/O will negate positive gains by caching. This requires a cache
directory to be really writable by the application.
This requires a cache directory to be really writable by the application.

Use this with care, and make sure to benchmark your application, as a point can
come where disk I/O will negate positive gains by caching.

Memcached Caching
=================
Expand Down

0 comments on commit 7af34e5

Please sign in to comment.