Skip to content

Cache Thing contents #2

@TerrorBite

Description

@TerrorBite

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue describes an improvement to existing code which already works.

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions