Fix for hanging web cache in multithreaded environment #364

#364