The #insertQuery macro is now cached, by default.
It's cached for just an hour, but in many situations you'll probably want to cache the results for much longer, perhaps even a full day. In your insertQuery macro, specify the caching time in minutes with the cacheExpires attribute, like this:
<!--#insertQuery aqpPath="path/to/aqp" cacheExpires="360"-->
That example would cause the cache to be flushed after six hours (60 minutes x 6 hours).
There are four other cache-related attributes in the insertQuery macro. They are:
-
allowCache - defaults to true - should the results be cached at all? If false, all of the other cache-related attributes are ignored.
-
allowGuestCache - defaults to true - should the results be cached for requests from guests?
-
allowMemberCache - defaults to true - should the results be cached for requests from members?
-
allowAdminCache - defaults to true - should the results be cached for requests from administrators?
Don't let these extra options confuse you. If you just want to cache your insertQuery macros as quickly as possible, you don't have to change anything: the macro results will be cached for an hour.
Seth