Open GoogleCodeExporter opened 9 years ago
This would be a good improvement, pull requests highly appreciated! :-)
Original comment by martin.grotzke
on 5 Apr 2013 at 8:18
Does the current JSON package actually save raw json to memcache or is it
passed through some kind of deflate or other binary filter? I switched over to
Jackson for JSON but I'm still getting binary data in the Memcached sessions.
Original comment by downch...@gmail.com
on 5 Apr 2013 at 11:22
For anyone reading, these are the two files to tweak.
core/src/main/java/de/javakaffee/web/msm/TranscoderService.java
core/src/main/java/de/javakaffee/web/msm/SessionValidityInfo.java
TranscoderService prepends a byte array of serializeSessionFields before the
transcoder data. SessionValidityInfo is the simple validity:* key, and is easy
to convert. No promises on submitting a pull request, but I'll try to get there.
Original comment by downch...@gmail.com
on 5 Apr 2013 at 11:55
IIRC spymemcached applies compression as soon as some threshold is exceeded,
you might want to be able to influence this.
Original comment by martin.grotzke
on 6 Apr 2013 at 7:11
For my use, I also had to add key prefixes to the memcached set calls and some
instanceof String checks on a few memcached get lines. spymemcached does need
compression turned off for other use cases (my strings are small enough); it's
mentioned in a thread to use:
MemcachedClient c = new MemcachedClient(new InetSocketAddress("127.0.0.1",
11211));
SerializingTranscoder serializingTranscoder = new SerializingTranscoder();
serializingTranscoder.setCompressionThreshold(Integer.MAX_VALUE);
c.set("testkey", 3600, "testvalue", serializingTranscoder);
https://groups.google.com/d/msg/spymemcached/tRD_lSEdXdk/RcVrWaByNJEJ
Original comment by downch...@gmail.com
on 7 Apr 2013 at 11:22
SessionIdFormat should be used more often. It does carry createLockName and
createBackupKey. It ought to handle creating a bare key as well as any other
keys used with memcached.
Original comment by downch...@gmail.com
on 8 Apr 2013 at 2:22
Issues are moved to github, this one is now
https://github.com/magro/memcached-session-manager/issues/201
Original comment by martin.grotzke
on 24 Aug 2015 at 5:05
Original issue reported on code.google.com by
downch...@gmail.com
on 5 Apr 2013 at 8:04