- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 19 May 2014 13:10:37 -0400
- To: Kristopher Giesing <kris.giesing@gmail.com>
- CC: "public-fx@w3.org" <public-fx@w3.org>
On 5/19/14, 1:06 PM, Boris Zbarsky wrote: > On 5/19/14, 1:05 PM, Kristopher Giesing wrote: >> Let me rephrase: it would make more sense to me to provide an >> object-getter for this task than an object-creator > > And this would then be a live object of some sort? Actually, let me rephrase also. If this list were time-invariant, then there would be no issue here. We'd just have the first ever get create the list, cache it, then keep returning it. But as I understand, the list is time-varying. So we have two options: 1) The first time the get is performed, create some object that stores the list, cache that object, always return that object in the future. When the list is supposed to change, update that object's state to reflect the new list. 2) When the get is performed, if we have no cached object create a new object, populate it with the list and cache it. Return the cached object (which we may have just created). When the list is supposed to change, clear the cache. Which of those two behaviors are we looking for here? -Boris
Received on Monday, 19 May 2014 17:11:10 UTC