New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771484 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature



Sign in to add a comment

All Cache/Transient Folders Not Being Relocated with DiskCacheDir Option

Reported by 4aakashs...@gmail.com, Oct 4 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Per https://www.chromium.org/administrators/policy-list-3, set DiskCacheDir to relocate cache folders to relocate cache contents to %LocalAppData% using "${local_app_data}/Google Chrome/User Data".  
2. UserDataDir is set to relocate the Chrome profile to %AppData% using "${roaming_app_data}/Google Chrome/User Data".

What is the expected behavior?
DiskCacheDir is used in conjunction with UserDataDir to set the Chrome profile to be stored in the %AppData% folder so that it can be included in the roaming profile.  The DiskCacheDir option helps relocate cache data to the %LocalAppData% folder.  The expected behavior is that all of the cache type folders are relocated to %LocalAppData%.

What went wrong?
The following folders are correctly relocated to the %LocalAppData% folder per DiskCacheDir at "${local_app_data}/Google Chrome/User Data":
1. Cache
2. Media Cache
3. old_Cache_000

However, there are several other folders that have not moved.  Some examples are below at "${roaming_app_data}/Google Chrome/User Data":
1. Default/GPUCache
2. Default/old_GPUCache_000
3. Default/Local Storage
4. ShaderCache (this includes GPUCache and old_GPUCache_000 under it)

Did this work before? No 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version: 

This is important in 2 situations:
1. In the Enterprise where roaming profiles are used
2. Any person who is looking to separate their temporary/cache/transient data with the data needed to recover their Chrome profile for the purposes of backup/restore.

Can this be corrected so that the other cache folders are also relocated?  Or, can additional policy options be made available to help relocate this data?  If there is some other way to already do this, please let me know (I couldn't find any other policy option related to this).

Thanks!
 
Cc: dconnelly@chromium.org
+dconnelly who implemented the policy. Could you provide some input here?

Comment 2 by woxxom@gmail.com, Oct 4 2017

"blob_storage" directory should probably be relocated as well
Cc: pmarko@chromium.org jmad...@chromium.org
It looks like this policy has been implemented a long time ago and dconnelly hasn't visited the bug tracker for a long time.

I'll try to add contributors who might know if it's OK to move the cache folders in question.
We might want to centralize code for assembly of paths to cache directories, if that's possible (i.e. not every cache dir has its special case).

I assume "Local Storage" (and "Session Storage" too) should _not_ be treated as a cache, it should be treated similarly to cookies. This is data websites can store locally.
So I'd say that it's OK that Local Storage does not depend on the policy value.
Please protest if you disagree.
Cc: dmu...@chromium.org
+dmurph
Daniel, would you know if it would make sense to change the path of the blob_storage directory[1] when the kDiskCacheDir pref is set? AFAIK blob_storage doesn't persist browser sessions (or does it?) so it could be regarded as a "cache".
Background: There's a command line flag and a enterprise policy to move caches to another directory, and blob_storage is one of the directories which don't get moved. We are wondering if it should be moved too or not.

[1] https://cs.chromium.org/chromium/src/content/browser/blob_storage/chrome_blob_storage_context.cc?rcl=cd79e17ec56bba732e6295877c7c9c896950271d&l=97
Cc: vmi...@chromium.org
I'm actually not entirely sure. Is it possible to add a test that covers the configuration with the disk cache moved?
Hm - I just use the storage partition directory (same place we store stuff like IndexedDB or localstorage). I guess it's true this is just cache, and it shouldn't be hard to move that directory.
@pmarko:  Hello!  Regarding Comment 5, an argument or question can be raised as to whether this Local Storage or Session Storage data should browse with the user from one computer to another, or whether it should remain on the computer where it was originally run.  Personally, I would think that would be a per computer item, and not go with the user on any computer, and therefore %LocalAppData% or the ability to segment to %LocalAppData% would be appreciated.  However, others may have a different opinion.

Otherwise, if there is some way to limit the amount of data in "Local Storage" and "Session Storage", either via amount of time, or number of sites or size of this, that would also be appreciated.

Thanks!
If we are going to implement this change, I think it would make sense to only move directories where we are sure that the user sees no difference if they suddenly go missing.

What would happen for users who already use the policy to redirect cache directories:
Current Chrome release:
  GPUCache is profile/../GPUCache
  Local Storage is in profile/Local Storage

New Chrome release where we move everything:
  GPUCache might be in <user_configured_dir>/../GPUCache
  Local Storage might be in <user_configured_dir>/Local Storage

Now I assume that we won't implement additional logic to store the old path, notice the change, and actually move the contents of the directories to the new location, so changing the path looks like deleting the contents to the browser.
I assume that deleting contents of GPUCache is not noticeable by the user, because it will be re-created.
Deleting contents of Local Storage would probably affect the function of some websites.

That's why I'd like to limit this to directories which will be re-created transparently on the fly.
Cc: michaeln@chromium.org
+Michael
Please see Comment #9 -- do know if there is a size limit for Local Storage / Session Storage?
Cc: pastarmovj@chromium.org
Labels: -Type-Bug Type-Feature
Owner: blumberg@chromium.org
Assigning to blumberg@ for triage.
Actually - I don't think we should move blob storage directory. Yes, it's ephemeral, but it's not really a 'cache'. This data can't be removed while a webpage is running and have the webpage continue to function, as some of it's data will be gone.
I guess I want clarification - why do customers want this file changed? Is this so they can do stuff like clear it? What is the functionality here?

Comment 15 by woxxom@gmail.com, Oct 13 2017

I suggested blob_storage because I didn't know if it's cache-like or not.
The problem is that its outdated contents is not automatically cleared when no longer used, which seems a separate bug.

As for the general purpose of %subject%, personally I use a RAM drive for the cache-like stuff as it's MUCH faster even than an SSD I also have.
Many people run Chrome off a networked drive so they want to have the cache-like stuff in a local directory as it makes Chrome much faster.
Ah - blobs are definitely cleaned up as soon as they're no longer used, the only time we leave them around is for shutdown (as the deletion jobs are Skip-on-shutdown). BUT we clean all the old ones up after startup.
To put some enterprise perspective to the question about why would people want to move any kind of transient data from the profile directory is when the prodile is hosted on some form of roamed/synced storage which can be expensive/slow to copy over the network. In such cases having any data that can be rebuilt/redownloaded on local storage or even ram-disks is both a significant performance boost as well as cost reducing factor. This is why we introduced the DiskCacheDir and MediaCacheDir policies back in the day. We might consider offering either a new CacheDir policy that will gather them all or continue doing this on a per cache type base for even more flexibility but either way it is good idea imo.

Comment 18 by brat...@opera.com, Dec 11 2017

Related to GPUCache. In Windows GPUCache, as well as ShaderCache/GPUCache and ext/sync-login/def/GPUCache, are in %APPDATA% instead of %LOCALAPPDATA% which means that they get backed up and roam when the user changes computer.

I can imagine this being the same bug but another symptom.
Owner: georgesak@chromium.org
Owner: bheenan@chromium.org
Status: Assigned (was: Unconfirmed)
No owner, backlogging

Sign in to add a comment