Nate,
That's exactly what I ended up doing.
Ryan,
Postgres schemas is what I'm using, and they aren't leaking from the
db for that very reason.
The problem is that Spree caches the values in
Spree::Preferences::StoreInstance. So rather than pulling from the DB
again, Spree is pulling whatever value was last cached in memcached.
I got the real problem fixed by overriding the cache settings to add a
tenant id to the key, but I would still like to know how to properly
clear the cache.
The Spree::Preferences::Preferable module has the following code:
if respond_to?(:after_destroy)
after_destroy do |obj|
obj.clear_preferences
end
end
Which would work for any single given model, but I'm not exactly sure
how you would properly execute the clear_preferences method to ensure
that _every_ model that included preferences was cleared.
I would also appreciate it if anyone else knows anywhere else in the
base Spree code that I'm going to run into these kind of caching
issues that I'm not aware of. This one gave me a good scare because
payment method settings get set in the preferences system, which are
getting cached.
Thanks again,
Chris
> --
> You received this message because you are subscribed to the Google Groups
> "Spree" group.
> To post to this group, send email to
spree...@googlegroups.com.
> To unsubscribe from this group, send email to
>
spree-user+...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/spree-user?hl=en.