Scheduled Redis cache clean up

Magento, starting from the CE 1.8 and EE 1.13 versions, has a built-in Cm RedisSession extension. This extension helps Magento to use Redis cache for the backend caching and session storage. We can find much information about Redis installation and configuration of the Magento store to make it working with the cache. Often, it is recommended to flush Redis cache daily to avoid huge cache amount and some caching issues that, usually, occur when some part of the dynamic content was changed. Our article describes a simple extension which will be running daily and flushing the whole Redis cache.