riboseinc / uri_format_validator

Validate URL for Rails
MIT License
3 stars 2 forks source link

Support cache store in reachability checks #52

Open skalee opened 6 years ago

skalee commented 6 years ago

No need to ping same domain all the time to check that it's reachable (see #12). Reachability tests results should be cached for performance. The cache store should be configurable and have the same interface as Rails cache. By default, there should be no cache, and the most common cache configuration should somewhat resemble following:

UriFormatValidator.cache_store = Rails.config.cache_store

For reference, Rails guide on caching.

ronaldtse commented 6 years ago

Agree @skalee !