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
Tell me what kind of things have you done on the social side?
What is $_ env in php?
Why do we use inheritance in php?
How do we get the current session id?
How are cookies created?
What is the difference between file_get_contents() and file_put_contents() in php?
Are there regular expressions in php?
What is trim codeigniter?
What is a static variable in php?
What is difference between echo and print in php?
How to join multiple strings stored in an array into a single string?
What is warning – “cannot modify header information – headers already sent”?
How to submit form without a submit button.
What is singleton design pattern in php?
What is difference between single quotes and double quotes in php?