日期:2014-05-16  浏览次数:20503 次

java与php的memcached的数据读取问题
一直用JAVA读写memcached没出问题
今天与PHP系统对接的时候,一直取不到PHP存储的元素,但是PHP又取得到JAVA这边存储的元素。
最后装了MemAdmin,查看了一下,PHP存储的元素的Flags全是0,而java使用类库存储的字符型的Flags是32。让PHP修改下存储的Flags后问题解决。
附带下几种类型的Flags:
	public static final int MARKER_BYTE             = 1;
	public static final int MARKER_BOOLEAN          = 8192;
	public static final int MARKER_INTEGER          = 4;
	public static final int MARKER_LONG             = 16384;
	public static final int MARKER_CHARACTER        = 16;
	public static final int MARKER_STRING           = 32;
	public static final int MARKER_STRINGBUFFER     = 64;
	public static final int MARKER_FLOAT            = 128;
	public static final int MARKER_SHORT            = 256;
	public static final int MARKER_DOUBLE           = 512;
	public static final int MARKER_DATE             = 1024;
	public static final int MARKER_STRINGBUILDER    = 2048;
	public static final int MARKER_BYTEARR          = 4096;