#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2012
    Posts
    1
    Rep Power
    0

    Caching content using regex match


    I want to use mod_disk_cache module to cache certain requested content on my server. Is there a way to match the request URL against a regex when using CacheEnable directive?

    I found the following way of achieving it in the documentation:

    <LocationMatch "regex">
    CacheEnable disk
    </LocationMatch>

    But when I use the above in the conf, apache doesnt start. Is there a minimum version that supports using CacheEnable inside the <LocationMatch> tag?
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    The CacheEnable documentation indicates this directive's context is "server config, virtual host," which means those are the only two areas/containers where this directive can exist (it cannot exist in a <Location>, <Directory>, or <Files> container).

    The documentation also indicates there's a third argument that allows you to specify the location/directory.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.

IMN logo majestic logo threadwatch logo seochat tools logo