ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / Big Data / Managing Memcached databases
  • Properties specific to memcachedConnection variables
  • WLanguage functions that use the memcachedConnection type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
memcachedConnection (Variable type)
In french: memcachedConnexion
The memcachedConnection type is used to define the characteristics of a connection to a Memcached server. You can define and change the characteristics of this connection using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Déclarer une connexion via le type memcachedConnexion
memConnexion is memcachedConnection
memConnexion.Server[1].Name = "MonServeur"
memConnexion.SupportCAS = True
memConnexion.BinaryProtocol = True
// Utiliser la connexion
Trace(MemcachedGet(memConnexion, "maclé"))
Properties

Properties specific to memcachedConnection variables

The following properties can be used to handle a connection to a memcached cache:
Property nameType usedEffect
PasswordCharacter string or Secret stringConnection password (used when connecting to a memcached server with authentication).
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
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.
Note: the binary communication protocol offers 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.
Note: CAS (Check And Set) allows you to perform a data modification operation only if the data has not been 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).
Remarks

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: 05/16/2025

Send a report | Local help