Enabling web preference settings in CE

閲覧: 87 回
最初の未読メッセージにスキップ

Russ Reichman

未読、
2013/10/24 12:43:412013/10/24
To: wince...@googlegroups.com
Hi,

I am interested in enabling the settings for the browser. The one that I am currently working on is the cache. The page cache works, but I would like to implement the resource cache. I am running into problems with the cache policy. Does anyone have any experience with this that they would be willing to share? It would be greatly appreciated.

Thanks,

Russ

patrick.east

未読、
2013/10/24 20:09:072013/10/24
To: wince...@googlegroups.com
I might be able to help, but I'm not sure I understand which piece you are referring to when you say resource cache in regards to the preferences. 

Do you mean the WinINet cache (based on the cache policy)? Or the settings for the page cache (based on the cache model)?

Can you provide any more details on what problems you are running into? 

-Patrick

Russ Reichman

未読、
2013/10/25 13:06:272013/10/25
To: wince...@googlegroups.com
Hi Patrick,

I am asking about loading sub-resources. It is based on the cache policy, which seems to be the problem, with it working the way I would like.
In this function: SubresourceLoader::didReceiveResponse(&), I would like to fall through to the 304 status code, and use the resource from the cache, but I am not getting past the if (resourceToRevalidate()).
I have been trying to understand why, but it has been a complicated process to understand the revalidation. I don't know much about the cache policy, and it looks like the cache is working, but I am not able to use it.
Thanks for you help,

Russ

Patrick East

未読、
2013/10/25 14:00:342013/10/25
To: wince...@googlegroups.com
So it sounds like there is never a resource to revalidate set on m_resource in the SubResourceLoader, correct? 

Assuming that's the case:

I'm not sure why exactly it wouldn't have set one for you, but if you can put some break points (or logging) into CachedResourceLoader::requestResource() there are a bunch of checks in there that lead up to the only way for one to get set (afaik) via "resource = revalidateResource(resource.get());"

If you can step through there and see which of the checks are going amiss you should get some more clues about what why it is doing that. The CachedResourceLoader::determineRevalidationPolicy() function has a bunch of comments in it explaining the various factors to determine the revalidation policy.

-Patrick


--
You received this message because you are subscribed to the Google Groups "Windows CE WebKit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wincewebkit...@googlegroups.com.
To post to this group, send email to wince...@googlegroups.com.
Visit this group at http://groups.google.com/group/wincewebkit.
For more options, visit https://groups.google.com/groups/opt_out.

Russ Reichman

未読、
2013/10/30 13:53:382013/10/30
To: wince...@googlegroups.com
Hi Patrick,

I have done some testing, and it appears that sometimes the cache is used, and other times it is not. When it is not used it goes down this path:
CachedRes.687 mustRevalidateDueToCacheHeaders
ResRespBase.407 headerValue: (null)
ResRespBase.409 Date HeaderValue=Empty
CachedRes.714 mustRevalidate.cachePolicy isExpired
CachedResLdr.613 determineRevalidationPolicy reloading due to missing cache validators.
CachedResLdr.446 Reload loadResource()

The first entry is the shortened filename, followed by the approx line number, instead of .cpp. It appears to me the date value is coming back null from the header. That is creating a expired cachePolicy, which ends up requiring a reload. I have other examples that appear to load the resource from cache, that end with this:
00.000 CachedResLdr.455 notifyLoadedFromMemoryCache()

My question is: am I on the right track? It seems the logic for getting the date: ResourceResponseBase.cpp, function: parseDateValueInHeader, doesn't have anything in the headerValue. Which makes the date null also.
Any help you can give, would be greatly appreciated.


Russ


On Thursday, October 24, 2013 11:43:41 AM UTC-5, Russ Reichman wrote:

Patrick East

未読、
2013/10/30 14:50:402013/10/30
To: wince...@googlegroups.com
Yea I would agree that you are on the right track. It might be worth taking a look at the network log with wireshark or something similar to see what headers are actually being sent and verify that they match up with what you are seeing on the ResourceResponse. 


全員に返信
投稿者に返信
転送
新着メール 0 件