Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Rerunning Default on Redirect

I am investigating a bug within one of our extensions, and something came up I don't have knowledge of.

If user navigates to a previous template page in an extension - usually through a <a href=#default> tag - is the router for the page they return to run again? Or does it just display whatever was in memory?

To better elaborate, the extension I'm working on allows payments to be skipped on specific loans. These loans are pulled through a core call and displayed - ignoring loans that have already been skipped. If the skip process is carried out, and then the user returns to the default page after being redirected to the submit page, would it make that core call again?

Posted 2 years ago
Votes Newest

Answers


Hello Tanner,

I would recommend caching that core call if you are concerned of them hitting it multiple times. Caching it will give you better control of when it needs to be called. I do recommend using a self.session_cache.

To answer your question if the frontend via a href tag or a javascript call submits to the backend then the router will run that method for that page again. It will only display what was in memory if you cache something explicitely and return it.

Note, sandbox will work the same as PTE and Production, so you should be able to test this flow in your sandbox environment.

It would be an interesting idea to add some sort of decorator that will cache a whole route. That would be useful in something like a widget.

-Trey

Posted 2 years ago
Trey Teter
489 × 4 Administrator
102 Views
1 Answer
2 years ago
2 years ago