Added cache responses for commands 4 to 9 and refactored the cacheModule with comments

the file check_cache is changed to cacheModule