ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Big Data / Managing Memcached databases
  • Properties specific to memcachedConnection variables
  • WLanguage functions that use the memcachedConnection type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
memcachedConnection (Type of variable)
In french: memcachedConnexion
The memcachedConnection type is used to define the characteristics of a connection to a Memcached server. The characteristics of this connection can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Declare a connection via the memcachedConnection type
memConnection is memcachedConnection
memConnection.Server[1].Name = "MyServer"
memConnection.SupportCAS = True
memConnection.BinaryProtocol = True
// Use the connection
Trace(MemcachedGet(memConnection, "mykey"))
Remarks

Properties specific to memcachedConnection variables

The following properties can be used to handle a connection to a memcached cache:
Property nameType usedEffect
PasswordCharacter stringConnection password (used when connecting to a memcached server with authentication).
NamespaceCharacter stringPrefix used for the keys stored on the server.
BinaryProtocolBooleanCommunication protocol between the memcached server and the client:
  • True (default value) if the memcached server uses a binary communication protocol,
  • False if the memcached server uses a text communication protocol.
Remark: the binary communication protocol proposes better performance and additional features.
ServerArrayCharacteristics of memcached servers used.
Server[n].NameCharacter stringServer name.
Server[n].WeightIntegerServer weight.
Server[n].PortIntegerServer port.
SupportCASBooleanSupport for CAS:
  • True if CAS supported.
  • False otherwise.
Remark: CAS (Check And Set) is used to perform a data modification only if this data was not modified since it was last read.
ConnectionTimeoutIntegerMaximum timeout for connecting to the memcached server (expressed in milliseconds). Corresponds to 10 000 by default.
UserCharacter stringUser (used when connecting to a memcached server with authentication).

WLanguage functions that use the memcachedConnection type

MemcachedAddAdds a new key/value couple into the Memcached cache.
MemcachedAddKeyGroupAdds a new key/value couple into the Memcached cache on a group of servers.
MemcachedAddPrefixAdds a value at the start of existing value in the cache for the given key.
MemcachedAddPrefixKeyGroupAdds a value at the start of existing value in the cache for the given key on a group of servers.
MemcachedAddSuffixAdds a value at the end of existing value in the cache for the given key.
MemcachedAddSuffixKeyGroupAdds a value at the end of existing value in the cache for the given key on a group of servers.
MemcachedAssignModifies a key/value couple in the Memcached cache:
  • If the key exists, the value is modified.
  • If the key does not exist, the key/value couple is added.
MemcachedAssignKeyGroupModifies a key/value couple in the Memcached cache on a group of servers:
  • If the key exists, the value is modified.
  • If the key does not exist, the key/value couple is added.
MemcachedCASModifies the value of a key if this one was not modified.
MemcachedCASKeyGroupModifies the value of a key on a group of servers if this one was not modified.
MemcachedDecrementDecrements the value associated with a key. The key is created if it does not exist.
MemcachedDecrementKeyGroupDecrements the value associated with a key on a group of servers.
MemcachedDeleteDeletes a key from the Memcached cache.
MemcachedDeleteKeyGroupDeletes a key from the Memcached cache on a group of servers.
MemcachedGetKeyGroupRetrieves the values of keys stored on a group of Memcached servers.
MemcachedIncrementIncrements the value associated with a key.
MemcachedIncrementKeyGroupIncrements the value associated with a key on a group of servers.
MemcachedModifyModifies a key/value couple in the Memcached cache.
MemcachedModifyKeyGroupModifies a key/value couple in the Memcached cache on a group of servers.
MemcacheGetRetrieves the values of keys stored on a Memcached server.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help