Copied from: https://github.com/scssphp/scssphp/issues/2 Rationale: - the Server class is getting bloated - the Server class has too many public functions: - compileFile() - always recompiles - checkedCompile() - compiles scss if cache doesn't exist - checkCachedCompile() - recompiles if necessary - serve() - the original purpose of this class Identified candidate cache implementations: - never - no caching; always (re)compiles - read - read only if cache exists; doesn't create - once - compiles only if cache doesn't exist - surface/shallow - recompile if main .scss file changes (note: this has no current API equivalent) - deep - recompile if main .scss file or any of its imports changes Technical considerations: - bust up the Server class - Cache/*.php implementations - "deep" should detect changes in setVariables() and setImportPaths() Other changes: - make Compiler cache aware (also, see existing importCache) - stale file detection using algorithm instead of metadata leafo/scssphp#321 - parse tree cache leafo/scssphp#328 - register custom error handler leafo/scssphp#330 - register custom input finder leafo/scssphp#329 - option to set/override or remove comment "compiled by scssphp..." leafo/scssphp#477 - option to compress (gzip) output leafo/scssphp#483
Activity
Update Server.php