[MAGNOLIA-453] Cache created corrupted files Created: 15/Jun/05  Updated: 17/Mar/09  Resolved: 10/Aug/05

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 2.1 Final
Fix Version/s: 2.1 Final

Type: Bug Priority: Minor
Reporter: Philipp Bärfuss Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX, Tomcat 5.0.28


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   

The files created in the cache are all of 3369 bytes size. Clicking on a already cached page leads to a redirection to the default page.

Configuration:
-------------
admin: false
cache: active
domain: setted to http://localhost:8082/magnoliaPublic

Both instances (admin and public are running in the same tomcat instance)

We tested it on Mac OSX, not yet on PC



 Comments   
Comment by Philipp Bracher [ 15/Jun/05 ]

detected the same problem on pc

Comment by Fabrizio Giustina [ 15/Jun/05 ]

Hi Philip, do you have any other detail or log related to the problem? I am actually running a site with the latest code from svn (with cache enabled) and I'm not experiencing any problem...
What do the files in the cache folder contain?
I'll try to reproduce and fix it asap, let me know if you have any hint

Comment by Philipp Bracher [ 15/Jun/05 ]

After some debugging i found out that the problem occures if the /server/cache/level1/domain is defined including the context path.

the uri passed to the streamURI method contains the context path this lead to a not existing url: http://localhost:8082/magnolia/magnolia/features.html

In the end this is a kind of a user error. If i don't define a domain everything is working fine (default). Since we define in the activation configuration the uri including the context path, i would prefere doing the same in caching.

An error in the log would also help. I will give this a lower priority and schedule it for 2.1 Final.

Comment by Fabrizio Giustina [ 15/Jun/05 ]

ok, the problem is the domain:
>> domain: setted to http://localhost:8082/magnoliaPublic

putting the context path in the domain doesn't work, cache automatically uses the context path from the original request.
This has never been changed, the behaviour is the same as before the latest changes to the cache system.

We will probably need to make the context path configurable, allowing it to be specified in domain, but the priority is lower, you can go on and release rc1.
Btw if you simply leave the domain blank cache works as expected.

I'll take care of making the cache configuration context-aware for 2.1 final

Comment by Fabrizio Giustina [ 11/Jul/05 ]

configuration is now context aware (e.g. you can set domain to http://localhost:8080/magnoliaPublic).

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