[elephant-devel] Persistent class slot
Leslie P. Polzer
sky at viridian-project.de
Sun May 30 09:20:51 UTC 2010
Warren Lynn wrote:
> So I think a possible solution is to allow a class to have persisted class
> slots, like "count". Then, some generic functions can be defined to allow
> the user code to update the persisted class slots in a contention safe way
> (wrapped in transactions) on some critical check-points, such as when a new
> instance is persisted or when a instance is deleted/modified. The functions
> could be named as "on-delete, on-add, on-modified. This way we can keep an
> up-to-date count all the time. Actually, class slot like "count" may even be
> made ready for the user to use directly without any addition user code.
Why not have a caching get-instance-count function instead?
More information about the elephant-devel