add caching to data_loader
add caching option