Caching with Array and using blocks for sql.