Forum Discussion

Mic_65039's avatar
Mic_65039
Icon for Nimbostratus rankNimbostratus
Apr 18, 2012

RAM CACHE and Stale-if-error option

Hi,

 

 

I'm using a PROFILE with RAM Cache enabled and a Max age=600

 

Is there an option on the BIG-IP such "Stale-if-error" which will allow to serve the stale content in RAM cache when origin is down?

 

This is to avoid sending an error to the end-user when TTL is expired and object already in cache.

 

 

 

Thanks

 

 

 

Mic

 

  • Hi Mic,

     

     

    I don't believe this is possible currently. You could open a case with F5 Support to confirm this. If that's true for now, you could request an enhancement to support this type of functionality. I think it could make a good feature.

     

     

    Thanks, Aaron
  • Hi Aaron,

     

     

    thanks for your quick reply.

     

    I opened a case with F5 support. hope they will answer quickly.

     

    I was taking a look in the BIG-IP guide and found nothing on this.

     

    But maybe this option avaible with the webaccelerator module only..

     

     

    Thanks

     

     

    Mic
  • Hi Aaron,

     

     

    I had the reponse from F5 support and they said it's not possible with RAM cache profile.

     

     

    I have another idea, let me know if you could help me.

     

    I will increase the max-age to 1week in the profile and will set use this script to clear the cache:

     

     

    Save the output file name as the script name

     

    OUT=/var/log/`basename $0`.out

     

     

    Print the date and script name

     

    echo "`date +%Y%m%d_%H%M%S`: `basename $0`: starting" >> $OUT

     

     

    List the current RAM cache entries for one HTTP profile

     

    echo "Entries before delete:" >> $OUT

     

    b profile http HTTP_1 ramcache entry show >> $OUT

     

     

    Delete current RAM cache entries for one HTTP profile

     

    b profile http HTTP_1 ramcache entry all delete

     

     

    List the current RAM cache entries for one HTTP profile

     

    echo "Entries after delete:" >> $OUT

     

    b profile http HTTP_1 ramcache entry show >> $OUT

     

     

    BUT i'd like to include a condition:

     

    If Pool_1 is down, then do not delete the RAMCACHE.

     

     

    Do you know to write this?

     

     

    Thanks

     

     

    Mic
  • Hi Mic,

     

     

    You could try something like this:

     

     

    tmsh show ltm pool $pool_name | grep 'Availability : offline'

     

     

    Aaron