| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Return a copy of the cache entry when local_cache exists:
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- When the local cache exists (during the request lifecycle), the
entry returned from the LocalStore is passed as a reference which
means mutable object can accidentaly get modified.
This behaviour seems unnecessarily unsafe and is prone to
issues like it happened in our application.
This patch dup the `Entry` returned from the cache and dup it's
internal value.
|
|/ |
|
|
|
|
| |
It should returns raw value, not instance of `ActiveSupport::Cache::Entry`.
|
|
|
|
|
| |
Fixes #31909.
Closes #31911.
|
|
|
|
| |
This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
No need to pass `#cleanup` options through to `LocalCache#clear`.
Fixes #29081. References #25628.
|
|
|
|
|
|
|
|
|
| |
See https://github.com/rails/rails/issues/29067#issuecomment-301342084
for rationale.
This reverts commit b76f82d714e590c20370e72fa36fa574c4f17650.
Fixes #29067. Fixes #29081.
|
|
|
|
|
|
|
|
|
|
| |
Some cache backends support the `unless_exist` option, which tells them
not to overwrite an existing entry. The local cache currently always
stores the new value, even though the backend may have rejected it.
Since we can't tell which value will end up in the backend cache, we
should delete the key from the local cache, so that the next read for
that key will go to the backend and pick up the correct value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We (GitLab) hit into an issue that somewhere in the middleware
chain was throwing `:warden`, which was caught in the wrapping
middleware, but `LocalCache::Middleware` was not aware of it.
It should look like:
``` ruby
result = catch(:warden) do
@app.call(env)
end
```
Source: https://github.com/hassox/warden/blob/090ed153dbd2f5bf4a1ca672b3018877e21223a4/lib/warden/manager.rb#L35-L37
Using `ensure` could make sure that we would always do the cleanup,
and better yet, avoid `rescue Exception` which we all should know
that could cause some issues which could be very hard to debug.
Please check the discussion thread for more context:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1402#note_25128108
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Remove parameter "options = nil" for #clear
|
| |
| |
| |
| |
| |
| | |
Move new CHANGELOG entry top [ci skip]
Remove parameter "options = nil" for #clear
|
| |
| |
| |
| |
| |
| |
| |
| | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| | |
|
|/
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
|
|
| |
- we are ending sentences properly
- fixing of space issues
- fixed continuity issues in some sentences.
Reverts https://github.com/rails/rails/commit/8fc97d198ef31c1d7a4b9b849b96fc08a667fb02 .
This change reverts making sure we add '.' at end of deprecation sentences.
This is to keep sentences within Rails itself consistent and with a '.' at the end.
|
| |
|
| |
|
|
|
|
| |
this themselves
|
| |
|
|
|
|
|
|
| |
fetch is supposed to behave differently, this was a mistake merged in
https://github.com/rails/rails/pull/22194
|
|
|
|
|
| |
LocalCache read_entry previously called the local_cache method 3 times,
now it only calls it once and keeps the result in a local variable.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Related with #11795.
|
| |
|
|
|
|
| |
actually doesn't increment/decrement in localstore.
|
|
|
|
|
| |
Extract LocalCache Middleware, so it can requires rack dependencies,
without adding rack dependencies to `AS::Cache::Strategy::LocalCache`.
|
|
|
|
|
|
|
|
| |
fixes #13547
The body may use the local cache during rendering. `call`ing the app
doesn't mean that rendering is finished, so we need to wait until
`close` is called on the body.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This saved about 46 array allocations per request on an extremely simple
application. The delegation happened in the notification subsystem
which is a hotspot, so this should result in even more savings with
larger apps.
Squashed commit of the following:
commit 41eef0d1479526f7de25fd4391d98e61c126d9f5
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date: Wed Nov 6 16:32:31 2013 -0800
speed up notifications
commit 586b4a18656f66fb2c518fb8e8fee66a016e8ae6
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date: Wed Nov 6 16:31:05 2013 -0800
speed up runtime registry methods
commit b67d074cb4314df9a88438f785868cef77e583d7
Author: Aaron Patterson <aaron.patterson@gmail.com>
Date: Wed Nov 6 16:28:12 2013 -0800
change method name and make it public
|
|
|
|
| |
same, so their logic is being refactored.
|
|
|
|
| |
its own method.
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit e34e4d43301618307f94123d3710f094297f91f3.
Reason: code changes are not allowed in docrails.
|
| |
|
| |
|
|
|
|
| |
posing for pictures.
|
|
|
|
| |
's/[ \t]*$//' -i {} \;)
|
| |
|