Closed iftaras closed 1 year ago
Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:
Hello,
I'm not sure if you have a try/catch somewhere in your code, but this code is definitely triggering me an error:
[Begin Test: Memcached]
[PHPFASTCACHE: CORE v9.1.2#c2dfc471 | API v4.2.0]
[PHP v8.0.27 with: bcmath, calendar, Core, ctype, curl, date, dom, fileinfo, filter, gettext, grpc, hash, iconv, json, libxml, mbstring, memcached, mongodb, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, readline, Reflection, session, SimpleXML, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib]
---
[FAIL] Uncaught exception "Phpfastcache\Exceptions\PhpfastcacheInvalidConfigurationException" in "~/lib/Phpfastcache/Config/ConfigurationOption.php" line 64 with message: "Unknown configuration option name "compress_data" for the config class "Phpfastcache\Drivers\Memcached\Config". Allowed configurations options are "servers", "host", "port", "saslUser", "saslPassword", "optPrefix", "itemDetailedDate", "autoTmpFallback", "defaultTtl", "defaultKeyHashFunction", "defaultFileNameHashFunction", "path", "preventCacheSlams", "cacheSlamsTimeout", "useStaticItemCaching", "superGlobalAccessor""
Test results: 1 assertion failed, 0 assertions skipped and 0 assertions passed out of a total of 1 assertion.
Test duration: 0.072s
Also make sure you phpfastcache version is up to date, since the option compress_data
has been removed a long time ago.
My apologies, you are correct. I had a fallback instance which resulted in a cache miss.
The compress_data
option though is still referenced for Memcache(d) in the Global configuration options wiki page.
Ohh right, I fixed the Wiki, thanks !
What type of issue is this?
Incorrect/unexpected/unexplainable behavior
Operating system + version
Ubuntu 20.04 5.10.16.3-microsoft-standard-WSL2
PHP version
8.1.12
Connector/Database version (if applicable)
Memcached 1.6.18 + PECL Extension 3.2.0
Phpfastcache version
9.1.2 ✅
Describe the issue you're facing
During configuration of the Memcached instance if we specify the
compress_data
option either be true or false we always hit a cache miss even though the data exists.Expected behavior
Since the data exists on the Memcached server we should get true when querying
isHit()
.Code sample (optional)
Instance configuration:
Example:
In the example above no matter how many passes we do, we will always get CACHE MISS. If we remove the
compress_data
option from the configuration everything returns to normal.Suggestion to fix the issue (optional)
No response
References (optional)
No response
Do you have anything more you want to share? (optional)
No response
Have you searched in our Wiki before posting ?