3

Using a RewriteMap and have it set up with the txt file method - which works fine.

Problem is, if I update that txt file - to either alter or add entries - the cache of that file created by httpd doesn't get updated. I don't understand why - according to Apache documentation:

"The looked-up keys are cached by httpd until the mtime (modified time) of the mapfile changes, or the httpd server is restarted. This ensures better performance on maps that are called by many requests."

I took this to mean that modifying the file would update the cache. Am I understanding that incorrectly? Do I really need to restart the httpd server every time I update this file?

Thanks for any help

corner
  • 31
  • 2
  • how are you checking whether the httpdconf is being updated or not? – Michael Coleman Feb 06 '15 at 07:58
  • Thanks. First, I didn't word that well so I will update it. To clarify, it is the cache that httpd is supposed to create for the RewriteMap txt file that is not getting updated. After modifying the txt file with new entries, those new entries have no effect (testing w/cleared browser cache/etc.) until I perform a service httpd restart. – corner Feb 06 '15 at 17:17
  • cool, caching is actually what I thought you meant (I wasn't clear there), 2 questions. 1. are you creating permanent redirects - `301` or temporary `302` ? also what browser are you using to check updates? – Michael Coleman Feb 06 '15 at 17:22
  • Hi - they are 301, and I am rotating through IE, FF, Chrome - with cache clearing & restarting before each test. I think one important item I am looking for is if I am correct in my interpretation of the apache docs - even though it isn't working for me at the moment. Thanks – corner Feb 06 '15 at 19:12

0 Answers0