Click or drag to resize
Memcache Methods

The Memcache type exposes the following members.

Methods
  NameDescription
Public methodAdd(String, Object)
Adds data to the server; only the key and the value are specified.
Public methodAdd(String, Object, DateTime)
Adds data to the server; the key, value, and an expiration time are specified.
Public methodClearEndOfLine
reads up to end of line and returns nothing
Public methodDecrement(String)
Decrement the value at the specified key by 1, and then return it.
Public methodDecrement(String, Int64)
Decrement the value at the specified key by passed in value, and then return it.
Public methodDelete(String)
Deletes an object from cache given cache key.
Public methodDelete(String, DateTime)
Deletes an object from cache given cache key, a delete time, and an optional hashcode. The item is immediately made non retrievable.
Keep in mind: add(string, object) and replace(string, object) will fail when used with the same key will fail, until the server reaches the specified time. However, set(string, object) will succeed and the new value will not be deleted.
Public methodDispose
资源释放
Public methodEquals
确定指定的 Object 是否等于当前的 Object
(Inherited from Object.)
Protected methodFinalize
允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。
(Inherited from Object.)
Public methodFlush
flushes output stream
Public methodFlushAll
Invalidates the entire cache. Will return true only if succeeds in clearing all servers.
Public methodGet(String)
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
Public methodGet(String, Type)
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
Public methodGetT(String)
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
Public methodGetCounter
Returns value in counter at given key as long.
Public methodGetHashCode
用作特定类型的哈希函数。
(Inherited from Object.)
Public methodGetType
获取当前实例的 Type
(Inherited from Object.)
Public methodIncrement(String)
Increment the value at the specified key by 1, and then return it.
Public methodIncrement(String, Int64)
Increment the value at the specified key by passed in val.
Protected methodMemberwiseClone
创建当前 Object 的浅表副本。
(Inherited from Object.)
Public methodRead
reads length bytes into the passed in byte array from stream
Public methodReadLine
reads a line intentionally not using the deprecated readLine method from DataInputStream
Public methodReplace(String, Object)
Updates data on the server; only the key and the value are specified.
Public methodReplace(String, Object, DateTime)
Updates data on the server; the key, value, and an expiration time are specified.
Public methodSet(String, Object)
Stores data on the server; only the key and the value are specified.
Public methodSet(String, Object, DateTime)
Stores data on the server; the key, value, and an expiration time are specified.
Public methodSet(String, Object, Int32)
设置数据
Public methodStats
Retrieves stats for passed in servers (or all servers). Returns a map keyed on the servername. The value is another map which contains stats with stat name as key and value as value.
Public methodStoreCounter(String, Int64)
Store a counter to memcached given a key
Public methodStoreCounter(String, Int64, Int32)
Store a counter to memcached given a key
Public methodToString
返回表示当前 ObjectString
(Inherited from Object.)
Public methodWrite(Byte)
writes a byte array to the output stream
Public methodWrite(Byte, Int32, Int32)
writes a byte array to the output stream
Top
See Also