Class: RailsPulse::Suggestions::CacheSuggestionsService
- Defined in:
- app/services/rails_pulse/suggestions/cache_suggestions_service.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from RailsPulse::Suggestions::Base
Instance Method Details
#generate ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/services/rails_pulse/suggestions/cache_suggestions_service.rb', line 4 def generate suggestions = [] if operation.operation_type == "cache_read" && operation.duration > 10 suggestions << build_suggestion( type: "performance", icon: "clock", title: "Slow Cache Read", description: "Cache read took #{operation.duration.round(2)}ms. Check cache backend performance.", priority: "medium" ) end suggestions end |