WIKI-741 get attachments by query, cache the page attachment count