Basic cache for readers with json and mtime

Use a custom json encoder for the metadata fields and decode once the json is
loaded.