Leif Hedstrom created TS-3505:
---------------------------------

             Summary: New plugin: cache promotion policies
                 Key: TS-3505
                 URL: https://issues.apache.org/jira/browse/TS-3505
             Project: Traffic Server
          Issue Type: New Feature
          Components: Plugins
            Reporter: Leif Hedstrom


This plugin will let you decide at cache write time if you really want to allow 
the object to get into cache or not. Once in cache, it'll of course continue to 
be served out of cache. The typical use case here is for a small cache, where 
the tail-end content is huge. Instead of churning the disks, we only allow to 
write objects to cache if they are "popular" enough.

The first implementation only implements a very simple statistical policy, 
ChancePolicy() which takes a percentage argument. So, you give it a percentage, 
say 5%, which means there's a 5% chance that the response gets written to 
cache. 95% of the time the requests will go to origin instead.

Caveat: There's an unfortunate problem with the APIs I was hoping to use, so 
right now it can only make the decision to write to cache or not in the 
TS_HTTP_READ_RESPONSE_HDR_HOOK hook using TSHttpTxnServerRespNoStoreSet(txnp, 
1);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to