| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| |
| | |
support :unless_exist for FileCache
Conflicts:
activesupport/CHANGELOG.md
activesupport/test/caching_test.rb
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
It is not good to include links in the code. These links can be in the
future outdated and nobody will upgrade they.
[ci skip]
|
|\
| |
| | |
[Fixes #11512] improves cache size calculation in MemoryStore
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveSupport::Cache::MemoryStore
Previously, the cache size of `ActiveSupport::Cache::MemoryStore` was calculated
as the sum of the size of its entries, ignoring the size of keys and any data
structure overhead. This could lead to the calculated cache size sometimes being
10-100x smaller than the memory used, e.g., in the case of small values.
The size of a key/entry pair is now calculated via `#cached_size`:
def cached_size(key, entry)
key.to_s.bytesize + entry.size + PER_ENTRY_OVERHEAD
end
The value of `PER_ENTRY_OVERHEAD` is 240 bytes based on an [empirical
estimation](https://gist.github.com/ssimeonov/6047200) for 64-bit MRI on
1.9.3 and 2.0.
Fixes GH#11512 https://github.com/rails/rails/issues/11512
|
| |
| |
| |
| | |
[ci skip]
|
| |
| |
| |
| | |
[ci skip
|
|/
|
|
| |
[ci skip]
|
|
|
|
| |
same, so their logic is being refactored.
|
|
|
|
| |
its own method.
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When comparing the directory to delete against the top level
cache_path, use File.realpath to make sure we aren't comparing two
unequal strings that point to the same path. This occurs, for
example, when cache_path has a trailing slash, which it does in the
default Rails configuration. Since the input to
delete_empty_directories never has a trailing slash, the comparison
will never be true and the top level cache directory (and above) may
be deleted. However…
2. File.delete raises EPERM when trying to delete a directory, so no
directories have ever been deleted. Changing the code to Dir.delete
fixes that.
|
| |
|
| |
|
|
|
|
| |
(active_support/dependecies.rb) (issue #8167)
|
|
|
|
| |
:race_condition_ttl working correctly.
|
| |
|
|
|
|
|
|
| |
ActiveSupport::Cache::MemCacheStore
memcache-client was deprecated in favour of dalli in 2010.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
|\
| |
| | |
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
|
| |
| |
| |
| | |
exception when an exception is thrown.
|
| |
| |
| |
| | |
Closes #6274
|
| | |
|
|\ \
| | |
| | | |
Fix cache (FileStore) clear to keep .gitkeep.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Reduce FILENAME_MAX_SIZE in ActiveSupport::Cache::FileStore
|
| |/
| |
| |
| | |
In order that temp filenames generated from it will fit in 255 chars. See https://github.com/rails/rails/issues/4907
|
| |
| |
| |
| | |
cache_path is Pathname.
|
|/ |
|
| |
|
|
|
|
| |
actually caching for development and test environments.
|
| |
|
|
|
|
|
|
| |
This reverts commit e34e4d43301618307f94123d3710f094297f91f3.
Reason: code changes are not allowed in docrails.
|
| |
|
| |
|
|
|
|
| |
code.
|
|
|
|
| |
not exist yet. This can happen if a delete_matched is called before anything is saved in the cache.
|
| |
|
|
|
|
| |
for the file system. (https://github.com/rails/rails/issues/3072)
|
|
|
|
|
|
| |
initialized with Pathname
Port from 3-1-stable
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Character encoding issues with MemCacheStore in 1.9.2
|
| | |
|
| | |
|