Refactor dasmon query and purge cache.