Proper locking when updating stats file.
Implement cleaning manifests during cache cleaning.
Update cache entries count properly.
Save count of manifests in stat counters.