Dispatcher cache rule priority | Community
Skip to main content
Level 4
February 2, 2016
Solved

Dispatcher cache rule priority

  • February 2, 2016
  • 3 replies
  • 1733 views

Say I have two rules in my dispatcher config: 

        /0001
        {
            /glob "/ajax/foo/bar.*"
            /type "allow"
        }
        
        /0002
        {
            /glob "*.ajax.*"
            /type "deny"
        }
                /0003
                {
                        /glob "*/ajax/*"
                        /type "deny"
                }

and i have a url like /ajax/foo/bar.x.y.json will it be cached? I thought it would as I assume the rules get applied in the order listed but this does not seem to be the case as my json is not cached.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

Yes, it does in the order

In your order, last rule '/0003' is deny everything with /ajax/ and hence it is not caching. Change the /type "allow" and it should be caching the same.

3 replies

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
February 2, 2016

Yes, it does in the order

In your order, last rule '/0003' is deny everything with /ajax/ and hence it is not caching. Change the /type "allow" and it should be caching the same.

Sutty100Author
Level 4
February 2, 2016

yep flipped my rule to the bottom and it worked, I'd assumed if a rule was more specific and/or a lower number it would take priority but like you say the last rule that matches seem's to be the one it goes with. Thanks :)

Lokesh_Shivalingaiah
Level 10
February 2, 2016

actually all the rules are executed in the order its been creaeted