Changes in new Dispatcher - 4.2.3
Dispatcher
URL decomposition in - path, selectors, extension, suffix, query string
Caching condition :
URL must be allowed by cache rule /cache
URL must have file extension / Not cached because dispatcher will not know what kind of contents are there
No query parameter - Search more about what query parameters are allowed
No suffix without extension
GET method / Now head is not allowed
HTTP response must be 200 OK
May cache 300 Redirect in future
Head must not have cache control headers like dispatcher : no-cache , cache-control : no-cache
For suffix, children of already cached page will not be cached
If you already have child cache for suffix, the child will be deleted and parent will stay
New features :
Response header caching :
This is introduced as encoding may get lost from your site and the contents may not be displayed correctly. So, the header will be cached in new version of dispatcher.
Disposition content header (need to research more)
TTL based invalidation and invalidation-throttling :
Helpful when you have some content/pages those you do not want to automatically invalidate
Way 1:
You can provide cache-control : max-age
and enableTTL
Way 2:
filter.pattern
/gracePeriod
To reduce the load of continuous invalidations
Regular Expressions in /cache and /filter (written inside single quote) :
Earlier :
We deny everything and then allow the required extensions
/filter
{
/001 {/type "deny" /glob "*"}
/002 {/type "allow" /glob ".png"}
/003 {/type "allow" /glob ".jpg"}
/004 {/type "allow" /glob ".jpeg"}
}
Structured approach
/extension added to /filter
/filter
{
/001 {/type "deny" /glob "*"}
/002 {/type "allow" /extension "png"}
/003 {/type "allow" /extension "jpg"}
/004 {/type "allow" /extension "jpeg"}
}
Now:
/filter
{
/001 {/type "deny" /glob "*"}
/002 {/type "allow" /extension '(png|jpe?g)'}
}
here e? means e is optional
Small Things :
1. Cache hit ratio to be displayed on log
2. Also will show farm/backend
3. Each farm can be separated and put in separate files with their order
i.e. 00-farm1.any
01-farm2.any
4. Virtual hosts can now have regular expression. like *.test.com
No comments:
Post a Comment