Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local object cache viewer #36

Merged
merged 5 commits into from
Mar 14, 2019
Merged

Conversation

valdisiljuconoks
Copy link
Collaborator

added version of Joe's local object cache viewer to dev tools

@valdisiljuconoks valdisiljuconoks requested a review from bjuris March 2, 2019 13:09
@valdisiljuconoks
Copy link
Collaborator Author

will add object expiration date column, but internals of System.Web.Caching.Cache have changed. So I need to dig a bit deeper there. They do not expose "nice"readable model to outside anymore.

@valdisiljuconoks
Copy link
Collaborator Author

CC @joemayberry

@bjuris
Copy link
Member

bjuris commented Mar 11, 2019

Server side paging would be required for sites that can have many million items in the cache. Also serializing something in the cache might affects its state (like triggering lazy loading) so not a big fan of that.

@valdisiljuconoks
Copy link
Collaborator Author

agree, we could provide it as op-in. admin selectively can ask for object size with awareness that it might trigger side effects

@bjuris
Copy link
Member

bjuris commented Mar 12, 2019

That makes sense.

@valdisiljuconoks
Copy link
Collaborator Author

Added "View Object Size" as optional action.
Regarding serverside list rendering and other beauties - think I'll need to unify all lists/tables and think about some nice interactive table implementation. Will do that in other PR.

}

private IEnumerable<LocalObjectCacheItem> ConvertToListItem(IEnumerable<DictionaryEntry> cachedEntries, bool viewObjectSize) =>
cachedEntries.Select(e => new LocalObjectCacheItem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just adding a Take(10,000) here would protect against issues with really large caches until server side paging is in place. This code otherwise have the potential of running a server out of memory.

@valdisiljuconoks valdisiljuconoks requested a review from bjuris March 13, 2019 15:50
@bjuris bjuris merged commit 5ec4e4a into episerver:master Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants