[MAGNOLIA-3505] VirtualURI configurations that lead to 404s seem to be cached Created: 11/Jan/11  Updated: 27/Nov/13  Resolved: 27/Nov/13

Status: Closed
Project: Magnolia
Component/s: cache, core
Affects Version/s: 4.3.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Michael Markowski Assignee: Philipp Bärfuss
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLCACHE-50 Provide possibility to exclude errors... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

I configured a new VirtualURI (regex).

class -> info.magnolia.cms.beans.config.RegexpVirtualURIMapping
fromURI -> /search/(.*)
toURI -> forward:/MyPage/de_DE/Search.html?q=$1

I tested the configuration several times with the following url:

www.foo.bar/search/ipod

It did not work (404).
After I found the problem (typo), I fixed the configuration, but it was not possible to access www.foo.bar/search/ipod anymore.

Slightly different URLs like www.foo.bar/search/ipod2 or www.foo.bar/search/iphone worked.

I restarted magnolia, problem persisted.
I assumed that the 404 would be cached by magnolia and deleted the cache directory and restarted again, then it worked.

From my point of view, 404's in VirtualURI mappings should not be cached (at least not forever) by magnolia.



 Comments   
Comment by Philipp Bärfuss [ 12/Jan/11 ]

Its arguable. We also cache redirects and other error pages to avoid unnecessary processing. In your case the system has first to access the repository to find out that it can't serve the request. Keeping this ticket open to collect more feedback on the topic.

Comment by Michael Markowski [ 12/Jan/11 ]

Maybe a configurable expiration time for caching would be helpful.
At least this behaviour should be mentioned in the documentation (http://documentation.magnolia-cms.com/reference/virtual-uri-mapping.html).

Comment by Magnolia International [ 13/Jan/11 ]

Michael, you can

Does that help ?

Comment by Michael Markowski [ 13/Jan/11 ]

Grégory,

thanks for the suggestion, I'll try it.
I think I'll have to update magnolia (using 4.3.1 now), since there are no Cache tools under Tools and the config section (config:/modules/cache/config/cacheFactory/) looks slightly different.

Comment by Magnolia International [ 19/Jan/11 ]

Sure, let me know how that goes

Generated at Mon Feb 12 03:47:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.