More work on cache decorator