문제

I having an input (.JSON,.jpg,.txt,etc..).That file i need to store into memcached server. I don't want to convert file to Byte[] before passing to memcached server. If any possibility to store file inside Memcached server? I am using spymemcached tool.

Example:

MemcachedClient mc=new MemcachedClient(new InetSocketAddress(192.168.7.104",11211));
File file=new File("D:\\test.txt");
mc.set("Key1",3600,file);
mc.get("Key1");
도움이 되었습니까?

해결책

You would have to read from the file and stored the read data in memcached. A File object is only a handle to the file and doesn't actually contain the data stored in the file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top