implemented log caching