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
Noah Hendrix
96f5ceaafb
make the cache test more @tenderlove(ing) and not depend on internal implentation
2012-10-23 18:42:37 -07:00
Noah Hendrix
81b7112565
pass the key to the block in cache.fetch on misses
2012-10-23 00:04:42 -07:00
Aaron Patterson
b91a90e496
adding a test for b21f24d9807bd161af947cf0f0cc440c9adffb73
2012-10-11 18:26:52 -07:00
Arun Agrawal
21051676fc
warning fixed: (...) interpreted as grouped expression
2012-10-01 18:25:19 +05:30
Brian Durand
b784900208
fix broken cache tests
2012-09-30 21:56:47 -07:00
Steve Klabnik
7f1eef9b01
Fix other assertions that were backwards.
...
This time I used ack.
2012-09-30 12:37:59 -07:00
Steve Klabnik
06d173b382
fix order of assertions.
2012-09-30 11:08:11 -07:00
Brian Durand
e3a746b6fc
Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead.
2012-09-30 09:26:04 -07:00
Aaron Patterson
6a79aa7f81
skip the memcache tests if the memcache server is not up
2012-08-22 15:42:48 -07:00
Guillermo Iguaran
bd680e3f5f
Add test to cover increment/decrement of non-existing key in MemCacheStore
2012-08-17 22:22:55 -05: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
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
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
Arun Agrawal
40c38d969c
warning removed: (...) interpreted as grouped expression
2012-03-31 16:31:07 +05:30
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
Erich Menge
be623677a3
Allow retrieve_cache_key to work on collections such as ActiveRecord::Relation.
2012-03-12 12:29:30 -05: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
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
David Heinemeier Hansson
83dbef6074
Revert "Fix expanding cache key for single element arrays"
...
This reverts commit abe915f23777efe10f17d611bf5718ca855a0704.
This broke all existing keys and it's wrong anyway. The array is just there as a convenience option for building the string. It's intentional that [ "stuff"] and "stuff" generates the same key.
2012-01-27 20:44:08 +01:00
Marcos Tapajos
e5425c8f68
Cache (FileStore) clear should keep .gitkeep
2012-01-13 13:28:16 -02:00
Karunakar (Ruby)
0023643522
Moved all the logger methods to active support logger
...
minor
2012-01-06 00:38:46 +05:30
Sergey Nartimov
1e9e88fcd3
remove checks for encodings availability
2011-12-25 14:34:58 +03:00
José Valim
4f35d5a18b
Merge pull request #4007 from exviva/expand_cache_key_for_one_element_array
...
Fix expanding cache key for single element arrays
2011-12-16 14:40:09 -08:00
Olek Janiszewski
abe915f237
Fix expanding cache key for single element arrays
...
In short:
expand_cache_key(element) should not equal expand_cache_key([element])
This way a fragment cache key for an index page with only a single
element in the collection is different than a fragment cache for a
typical show page for that element.
2011-12-16 17:58:25 +01: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
José Valim
3ee0116c94
Optimize cache expansion by skipping rails cache id in nested keys.
2011-11-23 18:22:09 +00:00
Olek Janiszewski
a650dd05f8
Fix #3737 AS::expand_cache_key generates wrong key in certain situations (part 2)
...
`nil` and `false` both expand to `""` (empty string), while `true` expands to
`"true"`; `false` should expand to `"false"`
2011-11-23 18:11:38 +01:00
Olek Janiszewski
d8e6dc9cf1
Fix #3737 AS::expand_cache_key generates wrong key in certain situations
...
`cache_key` method is never called when the argument is a 1-element array
with something that responds to `cache_key`
2011-11-23 18:06:16 +01:00
Xavier Noria
8f57bf207f
tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false
...
Respecting Genuine assert_equal false Edition
2011-11-21 14:22:16 -08:00
Xavier Noria
f312e2142b
Revert "tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false"
...
Reason: there were some genuine tests for false when
reading values, going to revise those ones.
This reverts commit a539a5e3f3be68f027d3dfe43f88dc9f0642c743.
2011-11-21 14:14:11 -08:00
Xavier Noria
a539a5e3f3
tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false
2011-11-21 14:11:40 -08:00
Xavier Noria
f3554777b2
cache entry: options[:compressed] is a regular flag, no need for !!
2011-11-21 14:01:53 -08:00
Philippe Huibonhoa
119a484e80
Improved testing so that it tests the real functionality and not the private method.
2011-10-02 01:39:52 -07: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
Philippe Huibonhoa
a0352a425f
Updated existing test that fails with this fix (8d63678d1406c5518d437709af0fde717c0248d7). Before the fix the test was giving a false positive, because file_store.key_file_path would return an empty filename (i.e. test/tmp_cache/4D0/F4D rather than test/tmp_cache/4D0/F4D/xxxx…).
...
Even though the fix referenced above divides the filename into directories to prevent it from being too long, it seems that 1000 characters will always raise an error, so reducing the key size to 900).
2011-09-21 21:03:59 -07: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
Santiago Pastorino
6e701e8735
Merge pull request #2393 from bdurand/fix_cache_read_multi
...
Fix ArgumentError in ActiveSupport::Cache::CacheStore.read_multi
2011-08-01 10:58:48 -07:00
Brian Durand
fec4c5ad76
Pass options in ActiveSupport::Cache::CacheStore#read_multi through to the delete_entry call.
2011-08-01 12:05:29 -05:00
Brian Durand
a263f37797
Change ActiveSupport::Cache behavior to always return duplicate objects instead of frozen objects.
2011-07-29 17:27:45 -05: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
José Valim
8f2e32158b
Merge pull request #1608 from sishen/sishen
...
MemcacheStore: deserialize the entry reading from local_cache when using
2011-07-11 04:54:28 -07:00
Sebi Burkhard
9e63f9f2e4
Properly cache value when it is "false"
2011-07-08 18:08:37 +07:00
Dingding Ye
c2aacdf2eb
MemcacheStore: deserialize the entry reading from local_cache when using raw
2011-06-10 01:15:37 +08:00
Josh Kalderimis
9cafc28874
Removed deprecated methods and related tests from ActiveSupport
2011-05-25 23:39:34 +02: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
5968d7a658
do not test explicit equality of predicate methods, they should be allowed to return truthy or falsey objects
2011-03-07 09:36:07 -08:00
Santiago Pastorino
4e0477c9b7
Test cache.key_file_path with separators ht. Jim Wilson [ #5611 ]
2010-11-07 20:02:14 -02: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