I am using PHP and Memcache. I want multiple keys to point to the same data.
$datawallright = $memcache->get('wads'.$wall->getIdwall());
This is how I retrieve the data. If there is no data I make some MySql queries, which take time. Most of the times the key points to unique data. The problem is that sometimes I want more keys to point to the same data.
$memcache->set('wads'.$wall->getIdwall(), $datawallright, false, 3600) or die ("Failed to save data at the server");
If I do this it is going to save the data in memcache which is ok for the unique values, but it is going to store the data multiple times in the other scenario, which is a waste of space in the cache.
So what I want bassicaly is wads1 and wads2 to point to the same data in memcache.