| Class | Globalize::DbViewTranslator |
| In: |
vendor/plugins/globalize/lib/globalize/localization/db_view_translator.rb
|
| Parent: | Object |
| cache_size | [R] | |
| cache_total_hits | [R] | |
| cache_total_queries | [R] | |
| max_cache_size | [RW] | The maximum size of the cache in kilobytes. This is just a rough estimate, the cache can grow bigger than this figure. |
# File vendor/plugins/globalize/lib/globalize/localization/db_view_translator.rb, line 120
120: def initialize
121: @cache = {}
122: @cache_size = 0
123: @cache_total_hits = 0
124: @cache_total_queries = 0
125:
126: # default cache size is 8mb
127: @max_cache_size = 8192
128: end
Returns the number of items in the cache.
# File vendor/plugins/globalize/lib/globalize/localization/db_view_translator.rb, line 44
44: def cache_count
45: @cache.size
46: end