caching activity in a field in activity mapper - good or bad?

22 views
Skip to first unread message

tanteanni

unread,
Jul 11, 2011, 7:52:50 AM7/11/11
to google-we...@googlegroups.com
i have a bad feeling by caching every (not to be constructed on every place change)-activity via the boiler plate overkill (imho it is): CachingActivityMapper, FilteredActivityMapper, overriding equals/clone of the place (in a contract breaking way?, i just created an abstract place with special equals/hashCode for this use case) only to get an existing instance of an activity. But if i understand the current documentation of activities and places correctly, this boiler plate way is the "default" way?!

but what about the way jens proposed here (and probably many users do it like this way - expect me?!) - caching the activity in a filed of a "normal" mapper? or the other way around: for what use cases a cached activity/new activity should be returned based on the decision - is place equal to old place? And is there a use case where this will work without overriding equals/hashCode?


thx in advance
Reply all
Reply to author
Forward
0 new messages