PHP Classes

File: src/Cache.php

Recommend this page to a friend!
  Packages of Caleb   PHP Common Class Library   src/Cache.php  
File: src/Cache.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Common Class Library
Set of classes that provides common functionality
Author: By
Last change: Security patch.

Changelog excerpt:
- Added a context attribute to mark certain properties as sensitive for the
purpose of reducing the risk of exposure via accidental var_dump of any
instances of the applicable classes in production (though, as attributes
were introduced with PHP 8.0, this change won't have any effect when
running on older PHP versions; affected code is also guarded to prevent
backwards-compatibilty problems).
Bug-fix.

Changelog excerpt:
- The cache handler failed to unserialise multiline data when fetching
cache entries due to a missing regex flag; Fixed.
PHP 8.4 compatibility patch.
Cache handler update (CIDRAM/CIDRAM#540).

Changelog excerpt:
- Added support for specifying a Redis database number to the cache
handler.
Clean up patterns.

Don't need to escape colons in that context.
New abstract class.

Changelog excerpt:
- Moved the version constant and the dataTraverse method to an abstract
class, which the other classes can then extend from, due to those being
common to all/most classes in the package.
- Added support for dot notation to the L10N handler.
v2.9.7
v2.9.6
Bug-fix.

Changelog excerpt:
- The cache handler's incEntry and decEntry methods weren't handling
non-expiring values correctly when using flatfile caching; Fixed.
v2.9.5
Cache handler patch.

Changelog excerpt:
- When using the cache handler with PDO, if the size of a cache entry
exceeds 64KB, in order to avoid exceeding the 64KB upper limit of the
TEXT data type, the cache handler will now attempt to compress the data
prior to executing the query.
Cache handler patch.

Changelog excerpt:
- Slightly improved performance for when using PDO.
Cache handler patch (CIDRAM/CIDRAM#388).

Changelog excerpt:
- Cache handler potentially generating unexpected exceptions in some
situations; Fixed.
v2.9.4
Cache handler patch.

Guard for PDO fetchAll() false return values.
Fix typo.
Cache handler patch.

Remove useless constant.
Cache handler patch.

- Fix returned entry expiries for getAllEntries and getAllEntriesWhere.
- Some minor refactoring.
Cache handler update.

Changelog excerpt:
- Added a new method to the cache handler: "getAllEntriesWhere" (see the
documentation for more details).
Optimise.
Refactor.
Experimental bug-fix for the cache handler.

Changelog excerpt:
- The code for fetching all entries from the cache when using Memcached as
the chosen caching mechanism relied on Memcached methods which haven't
worked properly since several major versions back from the current latest
Memcached bindings. Accordingly, the cache handler wasn't capable of
correctly fetching all entries when using Memcached. To remedy this, the
code which relied upon said methods has been removed, and in its place,
code has been added to manually index cache keys, and when fetching all
entries from the cache, this manual indexing will now be relied upon when
using Memcached (the code for other caching mechanisms, unaffected by
this problem, remains unchanged).
Ensure variable is defined.
Bug-fix (CIDRAM/CIDRAM#369).

Changelog excerpt:
- Redis shouldn't set EXPIRE for TTLs less than 1; Fixed.
v2.9.3
v2.9.2
v2.9.1
Cache handler patch.

Changelog excerpt:
- Added the optional ability for the cache handler to attempt to enforce
the permissions necessary for reading and writing files.
New cache handler methods.

Changelog excerpt:
- Added three new methods to the cache handler: "deleteAllEntriesWhere",
"incEntry", and "decEntry" (see the documentation for more details).
v2.9.0
v2.8.0
Use more 'link' tags.
v2.7.0

Changelog excerpt:
- Added the ability to segregate cache data on the basis of prefixes
specified by the instance.
Code-style cleanup.

- Public before private properties.
- Magic before public before private methods.
v2.6.2

Changelog excerpt:
- Allow dots to be escaped for dataTraverse in the operation handler.
Comment improvements.

Changelog excerpt:
- Improved and refactored some of the docblock comments across all classes.
Add public version constant.

Changelog excerpt:
- Added a public version constant to all classes, since it might be needed
by some implementations to ensure compatibility.
Code-style patch.
Cache handler patch.

Changelog excerpt:
- Added the ability to the cache handler to enforce hard limits for key
names.
Some minor refactoring.
Add FUNDING.yml file.
Date: 7 months ago
Size: 42,787 bytes

You need to be a registered user and login to get this file.

Login Immediately with your account on: