Skip to content

Add support for lazy evaluation of references #675

@SanderMertens

Description

@SanderMertens

Currently, when an object is being resumed into the in-memory store, its references are immediately resumed as well, typically as a result of serializers performing a corto_lookup or a corto_resolve. While this is convenient in some cases (a developer can walk easily walk references) the behavior is "viral", in that it can easily resume a large part of the complete object graph into the store.

To prevent this from happening, the typesystem and serializers should allow for "lazy" references, that are only resumed when the user explicitly asks for it.

Ideally, the difference between lazy and non-lazy references is hidden from the user, and is encapsulated in corto_set_ref (already exists) and corto_get_ref (doesn't exist yet) functions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions