A writing data cache for database using redis