Forum Discussion

C_D_18583's avatar
C_D_18583
Icon for Nimbostratus rankNimbostratus
Apr 28, 2006

Configuring RAM Cache with iRules

Hi,

 

 

I'm new with configuring RAM Cache with iRules and need a little assistance.

 

 

We are going to test the RAM Cache to store some repeatedly loaded images

 

The plan is to cache only the certain images that are in a specific directory.

 

If content contains ‘trial_images’ subdirectory it should be cached and load balanced using INT_content pool else go to INT_weblogic1.

 

 

 

 

Here are the URLs http://tools.infra.dev1.ca/Test_Portal/content/en/techsup/trial_images/.../...

 

or

 

http://tools.infra.dev1.ca/Test_Portal/.../.../...

 

 

 

 

Here is part of the iRule requirement:

 

 

elseif { $uri starts_with "/Test_Portal" } {

 

 

if { If content contains ‘trial_images’ subdirectory it should be cached{BIG IP} and load balanced using INT_content pool} {

 

}

 

else { pool INT_weblogic1 }

 

 

}

 

Thanks

 

  • Colin

     

     

    Thanks for your reply. I presume you can set the time out for cashing at the Virtual Server - profile ? Can this cache time out be set at the iRule?

     

     

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Well, there's no direct way to set a timeout value per se, but you can achieve the same thing.

     

     

    Since you can check the age of the data with CACHE::age and force it to expire (re-validate at the server level) with CACHE::expire, you can create some simple logic to enforce an effective timeout.

     

     

    For a complete list of the commands available you can check out the iRules Wiki section on the Cache commands here: Click here

     

     

    HTH,

     

    Colin