fix storing cache data to database without cache ID