[OSCACHE-2] Default for cache.path Created: 12/Mar/05  Updated: 16/Mar/05

Status: Open
Project: oscache
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Type: Improvement Priority: Major
Reporter: shishirksingh Assignee: oscache-issues
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Java Source File AbstractDiskPersistenceListener.java    
Issuezilla Id: 2

 Description   

If cache.path is not defined, then default the cache to java.io.tmpdir



 Comments   
Comment by shishirksingh [ 16/Mar/05 ]

Created an attachment (id=1)
Patched AbstractDiskPersistenceListener.java file





[OSCACHE-1] OSCache caching response from GZIP filter Created: 27/Oct/04  Updated: 27/Oct/04

Status: Open
Project: oscache
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Type: Bug Priority: Major
Reporter: bendg25 Assignee: chris_miller
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issuezilla Id: 1

 Description   

Hi

I am working with Matt Raibles Appfuse GZIP Filter and wanted the OSCache to
cache the GZIP response from that filter (as I want a smaler memory footprint
and I dont want to GZIP all the time...)....

But when I OS Cached the GZIP response, the next time it returned the response
it was gibberish....

I took the latest OSCache from CVS and added setContentEncoding("gzip").. on the
response inside ReponseContent and it then worked...

Is this a bug??

Full trace of what I did:

OSCache 2.0.2 did not work either ...

I tried the latest from the CVS and it works as there is new logic in the
CacheFilter stating:

[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(63) | GOT KEY OF
[/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==]
[oof] DEBUG [http-8080-Processor23] AbstractConcurrentReadCache.get(696) | get
called (key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)
[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(70) | respContent
content type is [text/html;charset=utf-8]
[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(71) | respContent locale
is [US]
[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(73) | <cache>: Using
cached entry for /oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==
[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(77) | clientLastModified
is [-1]
[oof] INFO [http-8080-Processor23] CacheFilter.doFilter(80) | SENDING BACK A
SC_NOT_MODIFIED

BUT WITH THE SC_NOT_MODIFIED commented out I get the same error...

NOTE: The same gibberish is seen on a Mozilla browser and a IE browser...

I think it could be todo with the way it stores the content type?

TRACE ADDING

[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(95) | calling
flushBuffer on cacheResponse
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(101) | STATUS IS 200
SC_OK SO CACHING THE CONTENT with key
[/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(104) | caching response
content with content type [text/html;charset=utf-8]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(105) | size is [2318]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(106) | country locale is
[US]
[oof] DEBUG [http-8080-Processor25] AbstractConcurrentReadCache.get(696) | get
called (key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)
[oof] DEBUG [http-8080-Processor25]
AbstractConcurrentReadCache.persistRetrieve(1039) | persistRetrieve called
(key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)
[oof] DEBUG [http-8080-Processor25] Cache.getCacheEntry(611) | No cache entry
exists for key='/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==', creating
[oof] DEBUG [http-8080-Processor25]
AbstractConcurrentReadCache.persistStore(1086) | persistStore called
(key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)

AND WHEN RETRIEVING

[oof] DEBUG [http-8080-Processor24] AuthenticatorBase.invoke(413) | Security
checking request GET /oof/todaysRaces.html
[oof] DEBUG [http-8080-Processor24] AuthenticatorBase.invoke(428) | We have
cached auth type FORM for principal GenericPrincipal[mraible(admin,)]
[oof] DEBUG [http-8080-Processor24] AuthenticatorBase.invoke(484) | Calling
hasUserDataPermission()
[oof] DEBUG [http-8080-Processor24] AuthenticatorBase.invoke(520) | Calling
accessControl()
[oof] DEBUG [http-8080-Processor24] AuthenticatorBase.invoke(538) |
Successfully passed all security constraints
[oof] DEBUG [http-8080-Processor24] StandardWrapper.allocate(700) | Returning
non-STM instance
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(59) | <cache>: filter in
scope 4
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(63) | GOT KEY OF
[/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==]
[oof] DEBUG [http-8080-Processor24] AbstractConcurrentReadCache.get(696) | get
called (key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(70) | respContent
content type is [text/html;charset=utf-8]
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(71) | respContent locale
is [US]
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(73) | <cache>: Using
cached entry for /oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(77) | clientLastModified
is [-1]
[oof] INFO [http-8080-Processor24] CacheFilter.doFilter(84) | SENDING BACK
RESPONSE SIZE IS [2318]

ADDED THIS:

response.setContentLength(compressedBytes.length);
log.debug("setting Content-Encoding to gzip");
response.addHeader("Content-Encoding", "gzip");

AND IT WORKS:

oof] DEBUG [http-8080-Processor25] AuthenticatorBase.invoke(538) | Successfully
passed all security constraints
[oof] DEBUG [http-8080-Processor25] StandardWrapper.allocate(700) | Returning
non-STM instance
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(59) | <cache>: filter in
scope 4
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(63) | GOT KEY OF
[/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==]
[oof] DEBUG [http-8080-Processor25] AbstractConcurrentReadCache.get(696) | get
called (key=/oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==)
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(70) | respContent
content type is [text/html;charset=utf-8]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(71) | respContent locale
is [US]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(73) | <cache>: Using
cached entry for /oof/todaysRaces.html_GET__DKDmrGxVhXXmMDcqxOikoQ==
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(77) | clientLastModified
is [-1000]
[oof] INFO [http-8080-Processor25] CacheFilter.doFilter(84) | SENDING BACK
RESPONSE SIZE IS [2318]
[oof] DEBUG [http-8080-Processor25] ResponseContent.writeTo(114) | SETTING
HEADER CONTENT ENCODING TO GZIP






Generated at Fri May 22 12:35:58 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.