Expand my Community achievements bar.

SOLVED

Dispatcher caching

Avatar

Level 3

Hi all,

We use services request to fetch the JSON data for the html page and the request does not have any extension. All the html pages are cached in the dispatcher. Is there a way to cache the service request so that whenever the user hit the page (whenever service request is used) the request is served from the cache and does not go to publisher.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

the dispatcher caches only files which have an extension; and the extensions which should be considered for caching can be configured in the dispatcher config as part of the caching rules.

So you need to add an extension to your service request (e.g. ".json"), and configure the dispatcher accordingly, then the caching will work.

Cheers,
Jörg

View solution in original post

2 Replies

Avatar

Level 10

Can you elaborate more on those services and how they are accessed ?

Avatar

Correct answer by
Employee Advisor

Hi,

the dispatcher caches only files which have an extension; and the extensions which should be considered for caching can be configured in the dispatcher config as part of the caching rules.

So you need to add an extension to your service request (e.g. ".json"), and configure the dispatcher accordingly, then the caching will work.

Cheers,
Jörg

The following has evaluated to null or missing: ==> liql("SELECT id, subject, body, depth, post_time, author.login, author.id, author.rank, metrics.views FROM messages WHERE topic.id = '${topicId}' AND is_solution = true").data.items[0] [in template "analytics-container" at line 82, column 31] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign acceptedAnswer = liql("SELECT... [in template "analytics-container" at line 82, column 5] ----