Page MenuHomePhabricator

[MVVM] Add a Factory class that help implementing cached item factory
Closed, ResolvedPublic

Description

It is best to make Factory class that support caching item efficiently. Leaving all the work to the developer is not the best here, and it could indeed benefit from a general helper Factory class to make that work easier.

cedric created this task.Nov 26 2018, 10:31 AM
cedric triaged this task as TODO priority.

I believe the CachingFactory will provide a function to set the cost limit in number of item and memory usage if the item provide the proper interface for it. It will then implement a InstanceGet() that will create an item if necessary or recycle one given by a call to Release(). It should be pretty straight forward hopfully.

cedric closed this task as Resolved.Jan 9 2019, 11:02 AM