Class: Rack::Reloader

Class | Rack::Reloader
In: | lib/rack/reloader.rb
Parent: | Object

High performant source reloader

This class acts as Rack middleware.

What makes it especially suited for use in a production environment is that any file will only be checked once and there will only be made one system call stat(2).

Please note that this will not reload files in the background, it does so only when actively called.

It is performing a check/reload cycle at the start of every request, but also respects a cool down time, during which nothing will be done.

### Methods

call new reload! safe_load

### Classes and Modules

Module Rack::Reloader::Stat

### Public Class methods

new(app, cooldown = 10, backend = Stat)

### Public Instance methods

call(env)
reload!(stderr = $stderr)
safe_load(file, mtime, stderr = $stderr)

A safe Kernel::load, issuing the hooks depending on the results

[Validate]