Memcached StorageService

Cantor, Scott cantor.2 at osu.edu
Mon Sep 29 15:43:35 EDT 2014


On 9/29/14, 3:38 PM, "Marvin Addison" <marvin.addison at gmail.com> wrote:

>> I guess it depends what scenario would be affected by the performance
>>hit,
>> but like I said, the straight update() call definitely doesn't need to
>> return it, I can change that.
>
>Ok, I think we may have a compromise:
>
>- Change update() methods to return boolean
>- Keep updateWithVersion() unchanged

I'm fine with that. I just changed the int to a long, I'll patch the
update methods now.

>I can do the extra read to get the version in the updateWithVersion
>case, but since it's not the common case in the IdP
>(StorageBackedIdPSession) it presumably won't have a dramatic impact.

Actually it does get used there, it's in the main writeToStorage method
for the main session record. I was pretty sure it had to be there, the
caches aren't that different. And the reasoning is the same, there's a
deserialize operation that has to be used to do an extra read there, it's
just JSON rather than XML.

But the point is that the main places it gets used, it's because it
matters and the code would have to do an extra read itself anyway, so it
doesn't matter (for performance) where that happens.

-- Scott



More information about the dev mailing list