Skip to content

Commit 5cb01e0

Browse files
committed
New feature.
Changelog excerpt: - Added the ability to segregate cache data on the basis of prefixes specified by the instance. This could be useful for when different installations are utilising the same caching mechanisms at the same server.
1 parent ed3286e commit 5cb01e0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
5252

5353
[2021.05.28; Bug-fix; Maikuolan]: Wrong casing used for some variables would cause undefined variable errors to occur; Fixed (#3).
5454

55-
### v3.2.2
55+
### v3.3.0
5656

5757
[2021.06.10; Maikuolan]: Added a flag for successful hits against blacklisted filetypes (needed by the upload handler for a newly added configuration directive). Also did some very minor refactoring.
5858

5959
[2021.09.05; Maikuolan]: Precaution against potential future undefined index added to fallback method.
6060

6161
[2021.10.30; Maikuolan]: Code-style cleanup: Public before private properties, magic before public before private methods.
62+
63+
[2021.10.31; New Feature; Maikuolan]: Added the ability to segregate cache data on the basis of prefixes specified by the instance. This could be useful for when different installations are utilising the same caching mechanisms at the same server.

assets/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Configuration defaults file (last modified: 2021.05.07).
10+
# This file: Configuration defaults file (last modified: 2021.10.30).
1111
##/
1212

1313
core:
@@ -385,6 +385,9 @@ legal:
385385
type: "bool"
386386
default: true
387387
supplementary_cache_options:
388+
prefix:
389+
type: "string"
390+
default: ""
388391
enable_apcu:
389392
type: "bool"
390393
default: true

src/Loader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,7 @@ private function initialiseCache(): void
12931293

12941294
/** Create new cache object. */
12951295
$this->Cache = new \Maikuolan\Common\Cache();
1296+
$this->Cache->Prefix = $this->Configuration['supplementary_cache_options']['prefix'];
12961297
$this->Cache->EnableAPCu = $this->Configuration['supplementary_cache_options']['enable_apcu'];
12971298
$this->Cache->EnableMemcached = $this->Configuration['supplementary_cache_options']['enable_memcached'];
12981299
$this->Cache->EnableRedis = $this->Configuration['supplementary_cache_options']['enable_redis'];

0 commit comments

Comments
 (0)