aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
Commit message (Collapse)AuthorAgeFilesLines
* deprecate String#encoding_aware? and remove its usageSergey Nartimov2011-12-241-1/+1
|
* Add ActiveSupport::Cache::NullStore to expose caching interface without ↵Brian Durand2011-12-121-0/+44
| | | | actually caching for development and test environments.
* Fix "in memory" where it should be "in-memory".Cheah Chu Yeow2011-11-133-4/+4
|
* Revert "Fix "in memory" where it should be "in-memory"."Vijay Dev2011-11-113-4/+4
| | | | | | This reverts commit e34e4d43301618307f94123d3710f094297f91f3. Reason: code changes are not allowed in docrails.
* Update Memcached website to its new one at http://memcached.org/.Cheah Chu Yeow2011-11-111-1/+1
|
* Fix "in memory" where it should be "in-memory".Cheah Chu Yeow2011-11-113-4/+4
|
* Refactor ActiveSupport::Cache::FileStore. used method and deleted duplicate ↵kennyj2011-10-301-3/+4
| | | | code.
* Added fix so that file store does not raise an exception when cache dir does ↵Philippe Huibonhoa2011-09-291-0/+1
| | | | not exist yet. This can happen if a delete_matched is called before anything is saved in the cache.
* No need to create a range objectSantiago Pastorino2011-09-221-3/+3
|
* Fixed issue in file store where it could create a filename that was too long ↵Philippe Huibonhoa2011-09-211-9/+8
| | | | for the file system. (https://github.com/rails/rails/issues/3072)
* Fix ActiveSupport::Cache::FileStore#file_path_key does not work if ↵Gonzalo Rodriguez2011-07-231-1/+1
| | | | | | initialized with Pathname Port from 3-1-stable
* MemcacheStore: deserialize the entry reading from local_cache when using rawDingding Ye2011-06-101-0/+8
|
* Make MemCacheStore work with Ruby 1.9 and -KuAndrew White2011-05-311-1/+1
|
* Removed deprecated methods and related tests from ActiveSupportJosh Kalderimis2011-05-253-37/+1
|
* Tidy up previous commit.José Valim2011-04-281-3/+8
|
* Merged pull request #219 from panthomakos/memcache.José Valim2011-04-281-1/+4
|\ | | | | Character encoding issues with MemCacheStore in 1.9.2
| * Fixed special character encoding issue with MemCacheStore in Ruby 1.9.2.Pan Thomakos2011-03-111-1/+4
| |
* | File should be open in read/write mode. When doing lock on a file.Arun Agrawal2011-04-181-1/+1
| |
* | Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-2/+2
| | | | | | | | | | | | 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?`.
* | Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-2/+2
| | | | | | | | suggestion!
* | Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-2/+3
|/ | | | 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?.
* remove to_s implementation so that inspect is helpfulAaron Patterson2011-03-021-1/+0
|
* * LocalCache strategy is now a real middleware class, not an anonymous classAaron Patterson2011-03-021-23/+29
| | | | posing for pictures.
* Fix FileStore cache incorrectly regenerating its key from a pathname when a ↵Denis Odorcic2010-11-071-4/+3
| | | | | | | | regexp is used in expire_fragment [#5850 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix misleading advice to add 'memcache' to GemfileWincent Colaiuta2010-10-101-1/+1
| | | | | | | | | | | | | | | [#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>
* remove another lolinjectAaron Patterson2010-10-011-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* making comments meaningful by correcting, adding and pruningNeeraj Singh2010-07-263-14/+13
|
* String#[] doesn't return the byte representation on 1.9.2, we should use ↵Santiago Pastorino2010-06-271-1/+1
| | | | | | getbyte that was already added as a Ruby < 1.9 core_ext Signed-off-by: José Valim <jose.valim@gmail.com>
* preventing memcached initialization errors with default servers list [#4921 ↵David Calavera2010-06-221-1/+1
| | | | | | | | state:resolved] As of this writing the JRuby client does not support a default port. Signed-off-by: Xavier Noria <fxn@hashref.com>
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-151-1/+1
|\
| * Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
| |
* | require conversions to use String#ordSantiago Pastorino2010-06-121-0/+1
|/
* Unforce memcache from ASSantiago Pastorino2010-06-011-1/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-291-5/+7
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* object_id may be negative, producing an invalid symbol. h/t Markus SchirpJeremy Kemper2010-04-281-1/+1
|
* ActiveSupport::Cache refactoringBrian Durand2010-04-276-252/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Caches * Add default options to initializer that will be sent to all read, write, fetch, exist?, increment, and decrement * Add support for the :expires_in option to fetch and write for all caches. Cache entries are stored with the create timestamp and a ttl so that expiration can be handled independently of the implementation. * Add support for a :namespace option. This can be used to set a global prefix for cache entries. * Deprecate expand_cache_key on ActiveSupport::Cache and move it to ActionController::Caching and ActionDispatch::Http::Cache since the logic in the method used some Rails specific environment variables and was only used by ActionPack classes. Not very DRY but there didn't seem to be a good shared spot and ActiveSupport really shouldn't be Rails specific. * Add support for :race_condition_ttl to fetch. This setting can prevent race conditions on fetch calls where several processes try to regenerate a recently expired entry at once. * Add support for :compress option to fetch and write which will compress any data over a configurable threshold. * Nil values can now be stored in the cache and are distinct from cache misses for fetch. * Easier API to create new implementations. Just need to implement the methods read_entry, write_entry, and delete_entry instead of overwriting existing methods. * Since all cache implementations support storing objects, update the docs to state that ActiveCache::Cache::Store implementations should store objects. Keys, however, must be strings since some implementations require that. * Increase test coverage. * Document methods which are provided as convenience but which may not be universally available. MemoryStore * MemoryStore can now safely be used as the cache for single server sites. * Make thread safe so that the default cache implementation used by Rails is thread safe. The overhead is minimal and it is still the fastest store available. * Provide :size initialization option indicating the maximum size of the cache in memory (defaults to 32Mb). * Add prune logic that removes the least recently used cache entries to keep the cache size from exceeding the max. * Deprecated SynchronizedMemoryStore since it isn't needed anymore. FileStore * Escape key values so they will work as file names on all file systems, be consistent, and case sensitive * Use a hash algorithm to segment the cache into sub directories so that a large cache doesn't exceed file system limits. * FileStore can be slow so implement the LocalCache strategy to cache reads for the duration of a request. * Add cleanup method to keep the disk from filling up with expired entries. * Fix increment and decrement to use file system locks so they are consistent between processes. MemCacheStore * Support all keys. Previously keys with spaces in them would fail * Deprecate CompressedMemCacheStore since it isn't needed anymore (use :compress => true) [#4452 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache storeJeremy Kemper2010-04-191-1/+7
|
* Fixed method sign errorSantiago Pastorino2010-04-091-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fix stack trace lines on class_evalSantiago Pastorino2010-04-091-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make sure MemCacheStore logger existsJoshua Peek2010-04-071-3/+3
|
* Drop expires argument from call to @data in MemCacheStore so it works with ↵Vladimir Andrijevik2010-03-281-1/+1
| | | | | memcache-client and memcached gems, as advertised [#3672 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* fixes a couple of wrong requiresXavier Noria2010-01-011-1/+1
|
* requires active_support/inflector/methods ↵Xavier Noria2010-01-011-0/+1
| | | | active_support/core_ext/string/inflections in local_cache.rb because it uses underscore
* requires active_support/core_ext/array/extract_options in mem_cache_store.rb ↵Xavier Noria2010-01-011-0/+1
| | | | because it uses extract_options!
* requires active_support/gzip in CompressedMemCacheStore because it uses ↵Xavier Noria2010-01-011-0/+2
| | | | ActiveSupport::Gzip
* Rdoc for changes introduced in e2ed1a1ca, 36058f450.David Vrensk2009-11-121-0/+5
| | | | | | [#3451 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Update Orchestra instrumentations and move part of logging to Orchestra.José Valim2009-10-151-4/+7
|
* Mute log info coming from the local_cache strategyPratik Naik2009-10-092-5/+7
|
* Restore split between require-time and runtime load path mungery. Simplifies ↵Jeremy Kemper2009-09-241-1/+1
| | | | vendor requires.