1

Using PuppetLab's Apache module, how would I enable caching for a particular URL? (I'm running a web application that puts all static content under a particular URL)

I understand the resulting configuration line should be CacheEnable type /foo, however neither apache::mod::cache nor apache::mod::disk_cache accept any parameters and from puppetlabs-apache/templates/mod/disk_cache.conf.erb it appears that including apache::mod::disk_cache will enable caching for / (which I don't want).

So how would I enable caching for just a particular URL via Puppet? Should I just use the concat::fragment to add the CacheEnable directive to the vhost or is there another way to do it?

smsearcy
  • 513
  • 5
  • 8
  • As an aside, I have found `mod disk-cache` very disappointing. Using it for *static* content will most likely slow you down instead of helping. Consider `nginx` for delivering these resources instead. – Felix Frank Jan 16 '15 at 09:28
  • Thank you, I'll look into `nginx`. The proxy is in front of a Tomcat application and I've heard it's generally best to minimize the JVM's load as much as possible so that's why I was going down this road. – smsearcy Jan 24 '15 at 00:48
  • I ended up using `jfryman-nginx` to configure nginx and I got caching working the way I wanted to. – smsearcy Feb 12 '15 at 18:38

0 Answers0