In Piwigo 2.7 we introduced a browser-side localStorage cache for lists of tags/albums/users/groups. It works fine BUT the LocalStorage is limited in size. Once you have reached, let's say... 10k albums, then your list of albums in administration listboxes become empty and forms are broken.
The solution to manually edit the browser configuration to increase LocalStorage cache is fine as a temporary fix, but cannot be considered as valid on the long run.
The most obvious solution I see is to simply avoid LocalStorage beyond a limit of albums/tags/users/groups. It means Piwigo will have to download the full list, but it will work.
In Piwigo 2.7 we introduced a browser-side localStorage cache for lists of tags/albums/users/groups. It works fine **BUT** the LocalStorage is limited in size. Once you have reached, let's say... 10k albums, then your list of albums in administration listboxes become empty and forms are broken.
The solution to manually edit the browser configuration to increase LocalStorage cache is fine as a temporary fix, but cannot be considered as valid on the long run.
The most obvious solution I see is to simply avoid LocalStorage beyond a limit of albums/tags/users/groups. It means Piwigo will have to download the full list, but it will work.
<!-- github-sync-id:857170638 -->
You can also get better of both worlds by checking if localStorage is full.
Something like that :
try{localStorage.setItem("name","Hello World!");//saves to the database, "key", "value"
}catch(e){if(e==QUOTA_EXCEEDED_ERR){alert('Quota exceeded!');//data wasn't successfully saved due to quota exceed so throw an error
}}
You can also get better of both worlds by checking if localStorage is full.
Something like that :
```php
try {
localStorage.setItem("name", "Hello World!"); //saves to the database, "key", "value"
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
alert('Quota exceeded!'); //data wasn't successfully saved due to quota exceed so throw an error
}
}
```
@see https://chrisberkhout.com/blog/localstorage-errors/
<!-- github-comment-id:818957212 -->
@nikrou nice advice. It's working fine. I've made several tests with huge lists of 30k albums and the system gracefully handle the localStorage limit.
@nikrou nice advice. It's working fine. I've made several tests with huge lists of 30k albums and the system gracefully handle the localStorage limit.
<!-- github-comment-id:819727166 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In Piwigo 2.7 we introduced a browser-side localStorage cache for lists of tags/albums/users/groups. It works fine BUT the LocalStorage is limited in size. Once you have reached, let's say... 10k albums, then your list of albums in administration listboxes become empty and forms are broken.
The solution to manually edit the browser configuration to increase LocalStorage cache is fine as a temporary fix, but cannot be considered as valid on the long run.
The most obvious solution I see is to simply avoid LocalStorage beyond a limit of albums/tags/users/groups. It means Piwigo will have to download the full list, but it will work.
You can also get better of both worlds by checking if localStorage is full.
Something like that :
@see https://chrisberkhout.com/blog/localstorage-errors/
@nikrou nice advice. It's working fine. I've made several tests with huge lists of 30k albums and the system gracefully handle the localStorage limit.