wro4j-core/src/main/java/ro/isdc/wro/model/resource/support/change/ResourceWatcher.java
public boolean tryAsyncCheck(final CacheKey cacheKey) {
    boolean checkInvoked = false;
    if (context.getConfig().isResourceWatcherAsync()) {
      if (isAsyncCheckAllowed()) {
        LOG.debug("Checking resourceWatcher asynchronously...");
        final Callable<Void> callable = createAsyncCheckCallable(cacheKey);
        submit(callable);
        checkInvoked = true;
      }
    } else {
      LOG.debug("Async check not allowed. Falling back to sync check.");
      check(cacheKey);
      checkInvoked = true;
    }
    return checkInvoked;
  }
public boolean tryAsyncCheck(final CacheKey cacheKey) {
    boolean checkInvoked = false;
    if (context.getConfig().isResourceWatcherAsync()) {
      if (isAsyncCheckAllowed()) {
        LOG.debug("Checking resourceWatcher asynchronously...");
        final Callable<Void> callable = createAsyncCheckCallable(cacheKey);
        submit(callable);
        checkInvoked = true;
      }
    } else {
      LOG.debug("Async check not allowed. Falling back to sync check.");
      check(cacheKey);
      checkInvoked = true;
    }
    return checkInvoked;
  }
public boolean tryAsyncCheck ( final CacheKey cacheKey ) { boolean checkInvoked = false ; if ( context . getConfig ( ) . isResourceWatcherAsync ( ) ) { if ( isAsyncCheckAllowed ( ) ) { LOG . debug ( "Checking resourceWatcher asynchronously..." ) ; final Callable < Void > callable = createAsyncCheckCallable ( cacheKey ) ; submit ( callable ) ; checkInvoked = true ; } } else { LOG . debug ( "Async check not allowed. Falling back to sync check." ) ; check ( cacheKey ) ; checkInvoked = true ; } return checkInvoked ; }
Will try an asynchronous check if the async configuration is enabled. If async check is not configured, a
synchronous check will be performed. The async check assumes that the {@link ResourceWatcherRequestHandler} is
enabled.
<p/>
If the async check is not allowed (the request was not passed through {@link WroFilter}) - no check will be
performed. This is important for use-cases when wro resource is included using a taglib which performs a wro api
call directly, without being invoked through {@link WroFilter}.

@return true if the actual check invocation was performed. This is important to decide if the resource change
should be skipped or not.
Will try an asynchronous check if the async configuration is enabled . If async check is not configured a synchronous check will be performed . The async check assumes that the { @link ResourceWatcherRequestHandler } is enabled . <p / > If the async check is not allowed ( the request was not passed through { @link WroFilter } ) - no check will be performed . This is important for use - cases when wro resource is included using a taglib which performs a wro api call directly without being invoked through { @link WroFilter } .