Our project is unique in that we want to cache particular json files. Our performance will rely on it. However it seems dispatcher is only capable of caching HTML. This will be real bad news for us if it's impossible.

In our /cache configuration, we'd like to do:

/rules

{

/0000

{

/glob "*.html"

/type "allow"

}

/0001

{

/glob "*.docache.json"

/type "allow"

}

}

Unfortunately, after requesting the json file through the dispatcher, the file is not cached at all, even if doing /glob "*" /type "allow"

Depends what you mean by clear out. Dispatcher does two things on activation request: invalidate and evict.

Invalidation:

find the /invalidate section of your dispatcher.any and add :

/0001

{

/glob "*.json"

/type "allow"

}

Obviously you'll need to change the numeric ID of the rule from 0001 to whatever makes sense for you.

Eviction (deletion):

If /mypath/mypage is being activated, then only files meeting globbing pattern /mypath/mypage.* will be deleted, such as /mypath/mypage.html and /mypath/mypage.json... however, child directories WILL NOT be evicted, such as /mypath/mypage/jcr_content/parsys/mycomponent.json

You might have some content at /etc/my-special-data that is being fed out in some component json at /content/mysite/mypage.myspecialdata.json or something, and if that's the case, 1 solution we've used at CITYTECH, Inc is to set up a replication listener that watches for /etc/my-special-data activations and kicks off dispatcher flush replication to /content/mysite/mypage, depending on how difficult these relationships are to track.