Closed PortaMx closed 8 years ago
There was a patch a few days ago that resolved memcache issues. Please test on the latest git revision
Don't work .. memcached is detected but he store nothing .. The caching routines a very ugly .. I don't understand not wy SMF that not make like the database function array .. I have that made and all cache types are supported and works. So I think, I implement my own caching code .. faster and simpler ;-)
How are you detecting it isn't storing anything? When I patched it, I added to the debug output to better detect hits and misses. Look for cache misses to find out if it isn't caching data.
Here is mine showing hits working
I think, we don't talk about the same .. I have memcached installed, not memcache .. that is not the same .. and memcached dont work in SMF, but it's work with mine cache service. 2 screenshots they i made in the memcached.php tool ...
Well .. I found the solution .. SMF MUST have a host for memcached .. but .. that is not a must !! If no host given, allways the localhost is used, so you can remove the check if this given !
SMF treats them both the same. A host should always be specified when using it.
One point why my memcached not works (a windows specific probem? I don't known)
this:
switch ($cache_accelerator) { case 'memcache':
must change to:
switch ($cache_accelerator) { case 'memcache': case 'memcached':
Now it works also on a windows system with a local memcached service
memcached is not a valid cache setting. You should specify memcache and SMF will pick the right one.
Whats smf has deteted:
Settings.php: ` ########## Cache Info ########## /**
Yes, as noted in the comment, it expects it to be called "memcache". This is what the code expects as well.
I think I see the problem now. SMF Admin GUI interface expects and saves it as "memcached", but the comments and code notes it should be "memcache".
Since specifying the caching accelerator is new in SMF 2.1 (2.0 would auto-select it), I think we can go ahead and fix one or the other. The GUI seems to be the simple fix.
Well .. a other point .. xCache is dead .. not more supported, can be dropped I think. I have rewritten the cache function completely .. to many overhead on each get/put cache in a case list. I need the case only on first load and create in each a function for get/put/clear the cache, There after the function is called directly .. very fast ;-)
I found a lot of : (doublepoints) in the cachefilename .. that give many trouble, because that is not a legal char on any filesystem (used in cachelevel 3 I think)
: is a legal character far as I know.
https://github.com/memcached/memcached/blob/master/doc/protocol.txt
Keys
Data stored by memcached is identified with the help of a key. A key is a text string which should uniquely identify the data for clients that are interested in storing and retrieving it. Currently the length limit of a key is set at 250 characters (of course, normally clients wouldn't need to use such long keys); the key must not include control characters or whitespace.
for a File ? Never .. not on Windows not on Linux
File based cache yes it is invalid. The file based cache can fix that though by subbing out illegal characters as needed.
yupp .. simple replace these Chars with a - , _ or # I have used a -
You should open this as a separate issue or push a PR that fixes this for the file based caching issue.
Oh no, no .. I never more push a pr on simplemachine, I push only corrections and new functions on my own Forum Repository ;-)
The only thing what I do for SMF .. if I find a bug, I do post it here .. not more, not less. And what makes SMF so, I do not care ...
I use memcached (not memcache) on a windows server, but that don't work. The cache is detected, but nothing is stored. My own routines they I have written for our Portal mod works very well. Anyone have tested that?