Sha256: dfcfe15469cc10edd73d00c6c096dc4506cfc42b499712c4d567e4f9a5607198

Contents?: true

Size: 790 Bytes

Versions: 3

Compression:

Stored size: 790 Bytes

Contents

module Fulmar
  module Infrastructure
    module Service
      module Cache
        # Implements Symfony cache handling
        class SymfonyCacheService
          # @param [Fulmar::Infrastructure::Service::ShellService] shell
          # @param [Hash] config
          def initialize(shell, config)
            @remote_shell = shell
            @config = config
          end

          def clear
            @remote_shell.run [
              "rm -fr app/cache/#{@config[:symfony][:environment]}",
              "php app/console cache:clear --env=#{@config[:symfony][:environment]}"
            ]
          end

          def warmup
            @remote_shell.run "php app/console cache:warmup --env=#{@config[:symfony][:environment]}"
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fulmar-0.6.5 lib/fulmar/infrastructure/service/cache/symfony_cache_service.rb
fulmar-0.6.4 lib/fulmar/infrastructure/service/cache/symfony_cache_service.rb
fulmar-0.6.3 lib/fulmar/infrastructure/service/cache/symfony_cache_service.rb