Can you please comment this method? Especially how `$redis` works.