Query caching and cleanup 

Added caching to M5NR API