Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

memcache add function syntax tag tutorial 2013 Donate at flattr Flattr this

Alert! Connect with 10,000 Chating Online. Join Now

Php memcache add () function

Write your php code

<?php ?>

Php Result

Your code below

(no version information, might be only in CVS)

Memcache::add -- Add an item to the server


bool Memcache::add ( string key, mixed var [, int flag [, int expire]] )

Memcache::add() stores variable var with key only if such key doesn't exist at the server yet. Memcache::add() returns FALSE if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set().

Also you can use memcache_add() function. See example below.

Example 1. Memcache::add() example


= memcache_connect("localhost", 11211);

/* procedural API */
memcache_add($memcache_obj, 'var_key', 'test variable', false, 30);

/* OO API */
$memcache_obj->add('var_key', 'test variable', false, 30);


Memcache::add() returns TRUE on success or FALSE on failure.

See also Memcache::set(), Memcache::replace().

Php memcache add Function syntax tag

memcache add php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online

Php memcache add syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.

Function index







Date & Time

Directory function




Form data handling

Mathematics operators


Php Mysql

Network Functions


php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online