-
Notifications
You must be signed in to change notification settings - Fork 119
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
Disable caching of batch connect form values #539
Conversation
add tests for cache disabling feature
end | ||
|
||
#Logic determining if attributes should be pulled from cache | ||
def update_with_cache(cache, app_specific_cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second argument app_specific_cache
is not used and should be removed. Storing app_specific_cache_setting information on the session_context like you are doing makes the most sense because the app is what has the build method to create the session context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the problem I ran into here is that the form_config is a private method on app, the model has no way of accessing this, unless the controller shares it with the model correct ? Or maybe in the build_session_context in app.rb attach app_specific_cache_setting to the session_context model ?
apps/dashboard/app/controllers/batch_connect/session_contexts_controller.rb
Outdated
Show resolved
Hide resolved
apps/dashboard/test/models/batch_connect/session_context_test.rb
Outdated
Show resolved
Hide resolved
apps/dashboard/app/views/batch_connect/session_contexts/new.html.erb
Outdated
Show resolved
Hide resolved
apps/dashboard/app/views/batch_connect/session_contexts/new.html.erb
Outdated
Show resolved
Hide resolved
apps/dashboard/test/models/batch_connect/session_context_test.rb
Outdated
Show resolved
Hide resolved
apps/dashboard/test/models/batch_connect/session_context_test.rb
Outdated
Show resolved
Hide resolved
apps/dashboard/app/controllers/batch_connect/session_contexts_controller.rb
Outdated
Show resolved
Hide resolved
apps/dashboard/app/controllers/batch_connect/session_contexts_controller.rb
Show resolved
Hide resolved
Support disabling caching of app attributes 1. disable globally all caching using OOD_BATCH_CONNECT_CACHE_ATTR_VALUES 2. enable/disable caching per app by setting cacheable: true (or false) 3. enable/disable caching per app attribute by setting cacheable: true (or false) As you can imagine, there are many permutations and those are captured in the tests. **note: reverted and reverted again to correct attribution since Michaud did all the work** Co-Authored-by: Michaud Reyna <Michaud.reyna14@gmail.com> Co-Authored-By: mreyna3 <16469425+mreyna3@users.noreply.github.com>
#386