Add locking to lifo_cache so it's python thread safe. Use it in ocr daemon to return cached data as soon as possible rather to get them through the job queue.