This is a discussion on How to delete memcache? within the PHP Programming forums, part of the Web Development category; I want to implement memcache in our site and but i want to know how to delete memcache? --kamal...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hi Kamal, // removes the key from the MemCache // $time is the amount of time in seconds (or Unix time) until which // the client wishes the server to refuse "add" and "replace" commands // with this key. For this amount of item, the item is put into a // delete queue, which means that it won't possible to retrieve it by // the "get" command, but "add" and "replace" command with this key // will also fail (the "set" command will succeed, however). After the // time passes, the item is finally deleted from server memory. // The parameter $time is optional, and, if absent, defaults to 0 // (which means that the item will be deleted immediately and further // storage commands with this key will succeed). // returns TRUE on success else returns FALSE // Possible errors set are: // MC_ERR_NOT_ACTIVE // MC_ERR_GET_SOCK // MC_ERR_SOCKET_WRITE // MC_ERR_SOCKET_READ // MC_ERR_DELETE MemCachedClient::delete($key, $time = 0); It can help you to delete memcache value using Key
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, This is nice question. generally we are using to search in the memcache vales through its key. For example. test_Key = testing here test_key is memcache key testing is the memcache values for the Key test_Key to search for testing we can do like this if($memClient -> get('test_Key')) echo "Search values Found"; i hope it is clear for you.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, memcache search ----------------- 1. first time am search black -> result cache to memcache. 2. second time am search shirt -> result cache to memcache. and again 3.search black shirt -> result throw to memcahe or query? Last edited by senraj : 10-19-2007 at 07:39 AM. |
| |||
| hi senraj, For the search of "black shirt" means memcache considered as new search key. So definitely results come from Query.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| ok . Thanks for your reply Mr.jeyaseelan .. 1.already cache to shirt search key in memcache. 2.am insert in new product of shirt ok. 3.again search to shirt -> result throw in memcache or query. Last edited by senraj : 10-19-2007 at 07:39 AM. |
| |||
| hi, i think it is not taken from memcache, because once an item added to that tags , the memcache is cleared up. Got my point?
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, using the same way we can delete $memClient -> delete('shirt') - Which will delete the cache value for shirt key Thanks
__________________ With, J. Jeyaseelan Everything Possible |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can we delete backup? | S.Vinothkumar | Database Support | 4 | 09-28-2007 06:35 AM |
| memcache commands and behavior | prasath | Database Support | 4 | 09-27-2007 01:04 AM |
| Phpaccelerator & Memcache | sivaramakrishnan | PHP Programming | 0 | 08-31-2007 08:59 AM |
| Memcache with Mysql | write2ashokkumar | Database Support | 0 | 08-02-2007 03:41 AM |
| memcache in PHP | DuraiBabu | PHP Programming | 6 | 07-18-2007 01:43 AM |