Uriel Katz
9ee0ffb360
Patched Marshal#load to work with constant autoloading (active_support/dependecies.rb) (issue #8167 )
2012-12-01 14:00:16 +02:00
Mike Evans
13d8777b63
Padding expires_in by 5 minutes on dalli key write to facilitate :race_condition_ttl working correctly.
2012-10-11 15:46:30 -04:00
Brian Durand
e3a746b6fc
Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead.
2012-09-30 09:26:04 -07:00
Guillermo Iguaran
82663306f4
Replace deprecated memcache-client
gem with dalli
in ActiveSupport::Cache::MemCacheStore
...
memcache-client was deprecated in favour of dalli in 2010.
2012-08-17 22:22:55 -05:00
Xavier Noria
447b6a4e67
removes usage of Object#in? from the code base (the method remains defined 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
5ea6b0df9a
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.
2012-08-06 00:30:02 +02:00
Michael Koziarski
e44009aa2b
Merge pull request #5125 from winston/log_exception_when_cache_read_fails
...
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
2012-05-21 19:02:48 -07:00
Santiago Pastorino
3a59eab5f7
Remove wrong rack/utils dependency from AS
...
Closes #6274
2012-05-12 09:18:39 -03:00
grosser
b5005b6259
add unless_exist option to memory store
2012-05-10 08:19:45 -07:00
Aaron Patterson
7a3e43cc58
Merge pull request #4452 from tapajos/e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed
...
Fix cache (FileStore) clear to keep .gitkeep.
2012-05-03 15:56:54 -07:00
Aaron Patterson
ad95a61b62
Merge pull request #4911 from Floppy/master
...
Reduce FILENAME_MAX_SIZE in ActiveSupport::Cache::FileStore
2012-03-30 17:43:55 -07:00
Winston
b52c66f1be
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown.
2012-02-22 19:19:05 +08:00
Issei Naruta
0b1ce07822
Bug: cache_path.size doesn't return length of filename but size of file if cache_path is Pathname.
2012-02-21 18:35:31 +09:00
Sergey Nartimov
b5f5e279a6
remove unnecessary require core_ext/string/encoding
2012-02-14 10:09:21 +03:00
James Smith
c33334fc92
Change FILENAME_MAX_SIZE in FileStore to 228.
...
In order that temp filenames generated from it will fit in 255 chars. See https://github.com/rails/rails/issues/4907
2012-02-06 17:03:26 +00:00
Marcos Tapajos
e5425c8f68
Cache (FileStore) clear should keep .gitkeep
2012-01-13 13:28:16 -02:00
Sergey Nartimov
5ca86ac8f9
deprecate String#encoding_aware? and remove its usage
2011-12-24 15:57:54 +03:00
Brian Durand
04d5eae4e8
Add ActiveSupport::Cache::NullStore to expose caching interface without actually caching for development and test environments.
2011-12-12 13:40:29 -06:00
Cheah Chu Yeow
a02b40a3d2
Fix "in memory" where it should be "in-memory".
2011-11-13 13:18:55 +08:00
Vijay Dev
9fd0cd3a12
Revert "Fix "in memory" where it should be "in-memory"."
...
This reverts commit e34e4d43301618307f94123d3710f094297f91f3.
Reason: code changes are not allowed in docrails.
2011-11-11 17:12:42 +05:30
Cheah Chu Yeow
df5c9fd9f4
Update Memcached website to its new one at http://memcached.org/ .
2011-11-11 17:07:02 +08:00
Cheah Chu Yeow
e34e4d4330
Fix "in memory" where it should be "in-memory".
2011-11-11 17:04:50 +08:00
kennyj
7670a5187d
Refactor ActiveSupport::Cache::FileStore. used method and deleted duplicate code.
2011-10-30 21:50:17 +09:00
Philippe Huibonhoa
0baa8f8604
Added fix so that file store does not raise an exception when cache dir does not exist yet. This can happen if a delete_matched is called before anything is saved in the cache.
2011-09-29 18:59:40 -07:00
Santiago Pastorino
667ef57de6
No need to create a range object
2011-09-22 14:14:24 -03:00
Philippe Huibonhoa
8d63678d14
Fixed issue in file store where it could create a filename that was too long for the file system. ( https://github.com/rails/rails/issues/3072 )
2011-09-21 21:00:46 -07:00
Gonzalo Rodriguez
49b0f9e395
Fix ActiveSupport::Cache::FileStore#file_path_key does not work if initialized with Pathname
...
Port from 3-1-stable
2011-07-23 17:57:04 -03:00
Dingding Ye
c2aacdf2eb
MemcacheStore: deserialize the entry reading from local_cache when using raw
2011-06-10 01:15:37 +08:00
Andrew White
1f34a79373
Make MemCacheStore work with Ruby 1.9 and -Ku
2011-05-31 23:31:35 +01:00
Josh Kalderimis
9cafc28874
Removed deprecated methods and related tests from ActiveSupport
2011-05-25 23:39:34 +02:00
José Valim
bb44cd727f
Tidy up previous commit.
2011-04-28 09:47:07 +02:00
José Valim
182d00897a
Merged pull request #219 from panthomakos/memcache.
...
Character encoding issues with MemCacheStore in 1.9.2
2011-04-28 00:40:42 -07:00
Arun Agrawal
92537b8c27
File should be open in read/write mode. When doing lock on a file.
2011-04-18 09:08:53 -07:00
Prem Sichanugrist
733bfa63f5
Remove #among?
from Active Support
...
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Pan Thomakos
72759f5867
Fixed special character encoding issue with MemCacheStore in Ruby 1.9.2.
2011-03-11 17:57:28 -08:00
Aaron Patterson
dc89e29f49
remove to_s implementation so that inspect is helpful
2011-03-02 15:17:13 -08:00
Aaron Patterson
b247c8d71a
* LocalCache strategy is now a real middleware class, not an anonymous class
...
posing for pictures.
2011-03-02 14:05:06 -08:00
Denis Odorcic
c452d734f2
Fix FileStore cache incorrectly regenerating its key from a pathname when a regexp is used in expire_fragment
...
[#5850 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-07 20:01:51 -02:00
Wincent Colaiuta
f659a1576f
Fix misleading advice to add 'memcache' to Gemfile
...
[#5539 state:committed]
Commit 57144388f removed the hard-coded dependency on the memcache-client
gem, and added this warning advising people to install it if needed. The
problem is, however, that if people follow the advice literally and install
the 'memcache' gem, they will wind up with a completely different thing,
which is not API compatible with the memcache-client gem and which Rails
can't work with.
So, be explicit and tell users to install the 'memcache-client' gem.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-10 14:30:22 -02:00
Aaron Patterson
6e1df2ca46
remove another lolinject
2010-10-01 17:55:39 -07:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Neeraj Singh
d214925625
making comments meaningful by correcting, adding and pruning
2010-07-26 23:03:46 -04:00
Santiago Pastorino
a822ce78b3
String#[] doesn't return the byte representation on 1.9.2, we should use getbyte that was already added as a Ruby < 1.9 core_ext
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 20:30:29 +02:00
David Calavera
b8330a2261
preventing memcached initialization errors with default servers list [ #4921 state:resolved]
...
As of this writing the JRuby client does not support a default port.
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-22 16:28:29 +02:00
Evgeniy Dolzhenko
ef404c771d
Fix a bunch of minor spelling mistakes
2010-06-15 12:04:22 +04:00
Santiago Pastorino
f802eb2f00
require conversions to use String#ord
2010-06-12 18:47:37 -07:00
Evgeniy Dolzhenko
ccf9577aee
Fix a bunch of minor spelling mistakes
2010-06-11 14:15:34 +04:00
Santiago Pastorino
57144388f0
Unforce memcache from AS
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-01 10:46:05 +02:00
José Valim
1b816d5024
The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [ #4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
2010-04-29 08:39:52 +02:00