What is mem_cache ? How do you put a database query into that ?
Answer Posted / salil
1. "memcached" is a high-performance, distributed memory
object caching system
2. "memcache" is a php module, which provides procedural and
object oriented interface to memcached server.
3. PHP Usage: ($Value can be the mysql result data array)
$CacheInstance = new Memcache;
$CacheInstance->addServer($Host,$Port);
// STORE
$CacheInstance->set($Key,$Value,MEMCACHE_COMPRESSED,$TTL);
// FETCH
$CacheInstance->get($Key);
// DELETE
$CacheInstance->delete($Key);
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
In PHP, fgets() is used to read a file one line at a time. State Whether True or False?
How can a cross-site scripting attack be prevented by php?
What is encapsulation in php?
What is a definer in mysql?
How many records can be stored in mysql table?
Explain what does the unlink() function means?
What is use of preg_replace in php?
What does echo mean in php?
What are different types of runtime errors in php?
What is php stack?
Which is better mysql or sql?
Does php support multiple inheritances?
How to delete file in php?
What does pear stand for?
Tell me is it possible to protect special characters in a query string?