I've configured Redis for caching and it's working fine. now I'm trying to push data into cache if any data updated in that table. When I'm inserting to the table I unserializing cache and pushing that data.
if ($redis->exists($hash . '-results')) {
$r = unserialize($redis->get($hash . '-results'));
array_push($r, $user);
$redis->set($hash . '-results', serialize($r));
$redis->expire($hash . '-results', 86400);
}
is there any way to find updated data and push into that cache?