lib/item.py: init/write cache file