Modified measurement service to use caching as opposed to the database