Forum Discussion

Cesar1's avatar
Cesar1
Icon for Nimbostratus rankNimbostratus
May 10, 2013

Different caching policies

Hi

 

I have applied a policy on a caching VS, but now need to do a modification and I need to send two different policies depending on whether caching is a uri or another but all within the same VS

 

example

 

- Www.host.com/kkkk/ * -> send to politics 1

 

- Www.host.com/abcd/ * -> send to politics 2

 

 

Is this possible?, As might be the irule?

 

Thanks for the response

 

  • What version of WebAccelerator are you using? This should be achievable in v11 by creating 2 applications with the different policies and using an iRule to select the correct profile based on the URI. Prior to v11 this is not possible a single WebAcceelrator would need to be created with custom nodes based on the URI.
  • Cesar1's avatar
    Cesar1
    Icon for Nimbostratus rankNimbostratus
    Hi

     

    The version es: 10.2.4 (Build 771,0)

     

    Unable to create a discriminating irule by uri and send it to two different VS a previous version to the 11th??
  • As Dawn said in v10 you need to create custom leaf nodes in the WA policy.

     

    using your example,

     

    - Www.host.com/kkkk/ * -> send to politics 1

     

    - Www.host.com/abcd/ * -> send to politics 2

     

    What do you want to do with these requests? the matching criteria in the WA policy will use mime type and extension to match an existing leaf node in the WA policy. Once you know what policy your matching now you can create another leaf node but add the path for the URI example to add a new leaf node for js and css objects click on the components branch node and then click on Add to add a new leaf node, give it a name and click on create and the new leaf will be added. If you want it to match the css and js objects for your uri /kkkk/ click on the new leaf node, then click on path on the right side. Then in the value(s) box enter /kkkk/. Now you have a leaf node that only matches /kkkk/ next you need to add a parameter. next to the Add button to add parameter click on the arrow to Add a parameter and select content type then click on Add. to match the css and js objects type in includes in the box to the right if Value matches, click the check box to the left of value matches and click on Save. Now you have a leaf node that only matches objects that start with /kkkk/ and have a extension or mime type that matches whats in the includes object type. now you can customize this leaf node by selecting the Acceleration rules menu and there you set Assembly rules and life time rules based on your needs.. I also move the new leaf node up in the branch so it’s above the original includes leaf node so it matches before the includes (just in case there is an order of operations)

     

    that’s how we handle custom caching for specific URIs.

     

  • As Dawn said in v10 you need to create custom leaf nodes in the WA policy.

     

    using your example,

     

    - Www.host.com/kkkk/ * -> send to politics 1

     

    - Www.host.com/abcd/ * -> send to politics 2

     

    What do you want to do with these requests? the matching criteria in the WA policy will use mime type and extension to match an existing leaf node in the WA policy. Once you know what policy your matching now you can create another leaf node but add the path for the URI example to add a new leaf node for js and css objects click on the components branch node and then click on Add to add a new leaf node, give it a name and click on create and the new leaf will be added. If you want it to match the css and js objects for your uri /kkkk/ click on the new leaf node, then click on path on the right side. Then in the value(s) box enter /kkkk/. Now you have a leaf node that only matches /kkkk/ next you need to add a parameter. next to the Add button to add parameter click on the arrow to Add a parameter and select content type then click on Add. to match the css and js objects type in includes in the box to the right if Value matches, click the check box to the left of value matches and click on Save. Now you have a leaf node that only matches objects that start with /kkkk/ and have a extension or mime type that matches whats in the includes object type. now you can customize this leaf node by selecting the Acceleration rules menu and there you set Assembly rules and life time rules based on your needs.. I also move the new leaf node up in the branch so it’s above the original includes leaf node so it matches before the includes (just in case there is an order of operations)

     

    that’s how we handle custom caching for specific URIs.