fix flaky assignment specs
0 means 0, not "approximately 0" for caching role override stuff Change-Id: Ic3b3cf44b8477fd6f61754fa31c51885a38b0b62 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244679 Reviewed-by: Aaron Ogata <aogata@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
4ff0aca3c4
commit
2670abe8a8
|
@ -18,6 +18,11 @@
|
|||
class FallbackMemoryCache < ActiveSupport::Cache::MemoryStore
|
||||
KEY_SUFFIX = '__no_expire'.freeze
|
||||
|
||||
def fetch(*, expires_in: nil)
|
||||
return yield if expires_in == 0
|
||||
super
|
||||
end
|
||||
|
||||
def fetch_without_expiration(key)
|
||||
fetch(key + KEY_SUFFIX)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue