Unable to create cache

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Unable to create cache

Postby panyang » Mon Dec 28, 2020 3:49 am

I used CEF 83.0.4103.97 and set cache_path to "D:\\11".
When I opened both applications, the page load of the second application was very slow, and the CEF log reported the following error.

[1225/140309.949:WARNING:value_store_frontend.cc(44)] Reading mhjfbmdgcfjbbpaeojofohoefgiehjai.alarms from failed: IO error: .../LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)
[1225/140321.196:ERROR:cache_util_win.cc(21)] Unable to move the cache: 拒绝访问。 (0x5)
[1225/140321.197:ERROR:cache_util.cc(139)] Unable to move cache folder D:\11\GPUCache to D:\11\old_GPUCache_000
[1225/140321.197:ERROR:disk_cache.cc(184)] Unable to create cache
[1225/140321.197:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
[1225/140321.600:ERROR:cache_util_win.cc(21)] Unable to move the cache: 拒绝访问。 (0x5)
[1225/140321.601:ERROR:cache_util.cc(139)] Unable to move cache folder D:\11\Cache to D:\11\old_Cache_000
[1225/140321.601:ERROR:disk_cache.cc(184)] Unable to create cache
panyang
Newbie
 
Posts: 5
Joined: Tue Dec 22, 2020 5:42 am

Re: Unable to create cache

Postby magreenblatt » Mon Dec 28, 2020 11:46 am

Check permissions for the D:\11 folder on your computer.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to create cache

Postby panyang » Mon Dec 28, 2020 8:46 pm

magreenblatt wrote:Check permissions for the D:\11 folder on your computer.


there is no problem while operate one application,but error occurs when two or more aplications work simultaneously
panyang
Newbie
 
Posts: 5
Joined: Tue Dec 22, 2020 5:42 am

Re: Unable to create cache

Postby magreenblatt » Mon Dec 28, 2020 10:24 pm

You cannot use the same cache path from multiple applications simultaneously.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to create cache

Postby panyang » Tue Dec 29, 2020 2:16 am

magreenblatt wrote:You cannot use the same cache path from multiple applications simultaneously.


for this situation, any way to solve this problem in case of operating multiple applications by using same cache path?
panyang
Newbie
 
Posts: 5
Joined: Tue Dec 22, 2020 5:42 am

Re: Unable to create cache

Postby ndesktop » Tue Dec 29, 2020 2:55 am

Other than patching Chromium or use a some kind of virtual filesystem which allows this, not really.
Besides, what happens if two separate apps navigates to the same url? They will get two separate cookies which will overwrite one another, rendering one session invalid and possibly block from server. Other that a some kind of leech application, what would be a hypotetical use case of multiple instances sharing the same cache?
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Unable to create cache

Postby HarmlessDave » Tue Dec 29, 2020 3:06 am

panyang wrote: for this situation, any way to solve this problem in case of operating multiple applications by using same cache path?


You could create sub-folders for each instance like D:\\11\instance-1234\\ and D:\\11\instance-5678\\ or ...\\instance-(generated-UUID)

Is there really a need to share the same cache contents? Can you explain why you need this?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Unable to create cache

Postby panyang » Tue Dec 29, 2020 3:36 am

HarmlessDave wrote:
panyang wrote: for this situation, any way to solve this problem in case of operating multiple applications by using same cache path?


You could create sub-folders for each instance like D:\\11\instance-1234\\ and D:\\11\instance-5678\\ or ...\\instance-(generated-UUID)

Is there really a need to share the same cache contents? Can you explain why you need this?



sometimes my application invoked externally to load different pages, there are some common information need to be shared among those pages (e.g. log in information)
panyang
Newbie
 
Posts: 5
Joined: Tue Dec 22, 2020 5:42 am

Re: Unable to create cache

Postby amaitland » Thu Dec 31, 2020 12:33 am

The easiest option is to have one process that maintains multiple windows (Chrome does this)

Use a Mutex to ensure you have a single app instance
Use some sort of IPC to communicate the requirement to open a new window with a different url within your application.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 42 guests