-
-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(dev/core#174) Memcache(d) - Updates to comply with PSR-16
There are two drivers, `CRM_Utils_Memcache` and `CRM_Utils_Memcached`. It's nice to update them in tandem (with similar design decisions). If an admin admin is experimenting/debugging, this consistency In addition to the standard PSR-16-style changes, there are a couple changes in how data is formatted when written to memcache: * To allow support for targetted `flush()`ing (one prefix at a time), we update the naming convention per https://github.com/memcached/memcached/wiki/ProgrammingTricks#deleting-by-namespace This means that a typical key includes a bucket-revision code: * BEFORE: `<site-prefix>/<bucket-prefix>/<item-key>` (`dmaster/default/mykey`) * BEFORE: `<site-prefix>/<bucket-prefix>/<bucket-revision>/<item-key>` (`dmaster/default/5b33011fea555/mykey`) * Values are `serialize()`d. This resolves an ambiguity where `Memcache::get()` does not let us know if it returns `FALSE` because there's an error because that's the stored value. By serializing, those scenarios can be distinguished. * `get(...) === FALSE` means "item was not found" * `get(...) === serialize(FALSE)` means "item was found with value FALSE"
- Loading branch information
Showing
2 changed files
with
157 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters