fenhl / lazyjson

lazy JSON I/O in Python
MIT License
22 stars 2 forks source link

Cache files based on timestamps #4

Open fenhl opened 9 years ago

fenhl commented 9 years ago

As suggested by @Farthen, File objects should cache the decoded data, look at the file's last modified date when accessing data, and use the cached data if the file has not been modified since the last read.

howardjones commented 2 years ago

I've just added this, for non-opened files (I don't think it can/should be done for generic IO objects). Although I've also found I'm getting a lot of TypeError: can only concatenate str (not "Node") to str type stuff, so maybe this isn't the transparent nirvana I was hoping for.