Replies: 2 comments
-
Hello, You need to store (statically or in an other way) your cache instance along your script. Because actually something is calling the CacheManager multiple times with the same settings. |
Beta Was this translation helpful? Give feedback.
0 replies
-
hey @Geolim4 many thanks.. smart hint and solved ;) regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
With the Class example: https://github.com/PHPSocialNetwork/phpfastcache/blob/master/docs/examples/extendedPhpFastCache.php i implemented my own cache class which extends PhpfastcacheAbstractProxy.
Alls fine so far, expect the all know PHP notice: Calling many times CacheManager::getInstance() for already instanced...
My own cache class and the constructor:
Then i have a own method to get a cached item:
Now in my other classes where i need to work with the cache i use the own cache class:
use app\cache;
And then i load it in the construct of that other class to use it:
$this->cache = new cache();
I know, thats exact the thing that will give above PHP notice warning.. i know...
If i read trough the extendedPhpFastCache example.. i only see the own cache class.. but how to call/load it in other files to re-use it without PHP notice warning?
Hints are very welcome ;)
Thanks a lot
thomi
Beta Was this translation helpful? Give feedback.
All reactions