-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching Bugs - Corrupted/overwritten keys. Values that throw errors when fetched #424
Comments
It feels like there are probably 2 or 3 different bugs here:
|
@nesquena, why are all of the bugs about caching with RABL being ignored (there are at least 3 issues open)? I think caching is pretty important to RABL and there are likely some very serious bugs in it. I am happy to help out but some guidance on what RABL is doing here would be helpful. |
Sorry, don't mean to ignore caching bugs, honestly I am a bit overstretched right now working on too many different things. RABL Caching was originally implemented by @databyte and other contributors so it is not the first thing I reach towards when I want to put a little time into RABL. Also, it's not a huge personal pain I'm feeling on my own rabl projects at the moment but I fully recognize it's importance. If anyone else can help submit patches for caching, I am more then happy to review and apply. If I missed any then please let me know. |
Speaking of which, take a look at #417 and see if that would help address any of the issues? |
I am running into a pretty strange bug with caching
RABL
views.I have a setup that looks something like this:
Relevant Config
Views
Note: Except for the two employee show views, I use the default cache keys throughout.
Controllers
When I hit the
companies#show
controller, I expect/get cache keys like the following:I am also getting additional cache keys on
companies#show
that I'm not expecting that look like this:Does the collection view generate additional cache values other than the ones normally created by the view it extends?
When I hit the
employees#show
controller, I expect/get cache keys like the following (depending on user permissions):Everything basically works when I visit either of those routes _independently. Weird things happen when I visit _one route after the other.
For instance, after loading the
companies#show
I will have the 3 cache keys above, and as expected they have different values:but, if I then visit the
employees#show
, those cached values are _the same_.It is like calling the show template directly and creating the
JSON
cached version is corrupting thehash
version (which should only be getting read and not written anyways).Furthermore, I am also getting spurious exceptions like
ArgumentError (undefined class/module Team):
when I fetch some keys from the cache.Basically, if I hit the
companies#show
everything is fine and loads correctly. I can make changes and my expiration code works great as well. If I then hit theemployees#show
it also works fine and returns the correct data. _But, when I hit thecompanies#show
again _after theemployees#show
I get back _incorrect data for employees_ that excludes changes and excludes all additional partials from theemployees/show.rabl
that are attached as nodes. Both calls are read only and will always happen even if there are no changes to any DB records/cache invalidations between them. I am at a loss here for what is happening.Any thoughts on what might be going on?
The text was updated successfully, but these errors were encountered: