roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Cannot adjust compression threshold #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
We are using spymemcache to save static pages of our website.
If your page is heavy, the page is stored compressed. We do not want to
save compressed files. To avoid this we have used this code but does not work.

                 DefaultConnectionFactory dfaultConnFctry = new
DefaultConnectionFactory();
                 ((BaseSerializingTranscoder)
dfaultConnFctry.getDefaultTranscoder()).setCompressionThreshold(Integer.MAX_VALU
E);
                 MemcachedClient c=  new MemcachedClient(dfaultConnFctry,
AddrUtil.getAddresses("localhost:11211");
                 key = req.getParameter("id");
                 c.set(key, 60*60*24*30, page);

Could you help us? Thank you very much for everything.

Original issue reported on code.google.com by mdlte...@gmail.com on 20 Jan 2010 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by dsalli...@gmail.com on 26 Aug 2011 at 6:41

GoogleCodeExporter commented 9 years ago
MemcachedClient c = new MemcachedClient(new InetSocketAddress("127.0.0.1", 
11211));
SerializingTranscoder serializingTranscoder = new SerializingTranscoder();
serializingTranscoder.setCompressionThreshold(Integer.MAX_VALUE);
c.set("testkey", 3600, "testval", serializingTranscoder);

Original comment by kal...@gmail.com on 8 Oct 2012 at 11:25

GoogleCodeExporter commented 9 years ago

Original comment by ingen...@gmail.com on 8 Oct 2012 at 3:45