fix(db): query cache properly handles more callable types

Did you mean to put `->` here?