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

Cache Thing contents #2

Open
TerrorBite opened this issue Aug 23, 2016 · 2 comments
Open

Cache Thing contents #2

TerrorBite opened this issue Aug 23, 2016 · 2 comments
Labels
enhancement This issue describes an improvement to existing code which already works.

Comments

@TerrorBite
Copy link
Owner

TerrorBite commented Aug 23, 2016

The list of object IDs contained by another database object should be cached in the Thing.

If a Thing's parent is changed, it should update the contents cache of both the new and former parent Things, but only for parents that are loaded and have their contents already cached (otherwise there is no point).

Care must be taken when loading an object whose child has recently been moved elsewhere, as the database will be lagged behind the cache if the child has not yet been saved. The World class will need to maintain a sparse but authoritative index of parent-child relationships (in the form of a dict) and layer this data on top of the data returned from the database.

@TerrorBite
Copy link
Owner Author

Also, I really need to rename Thing to something more… descriptive.

@TerrorBite
Copy link
Owner Author

Need to check whether this is implemented in the current code.

@TerrorBite TerrorBite added the enhancement This issue describes an improvement to existing code which already works. label Apr 19, 2019
@TerrorBite TerrorBite moved this to To Do in Textgame Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue describes an improvement to existing code which already works.
Projects
Status: To Do
Development

No branches or pull requests

1 participant