Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

framework for different caching strategies #30

Open
springmeyer opened this issue Nov 16, 2011 · 0 comments
Open

framework for different caching strategies #30

springmeyer opened this issue Nov 16, 2011 · 0 comments

Comments

@springmeyer
Copy link
Member

Driven by https://github.com/mapbox/tilemill/issues/922 we should think about how to make the caching (and cache flushing) functionality more modular.

So far for the experimentation in the 'live-cache' branch of tilemill this is all that is needed to trigger rec-caching upon save, but we can do better:

diff --git a/lib/millstone.js b/lib/millstone.js
index ef4beb0..fdd70b5 100644
--- a/lib/millstone.js
+++ b/lib/millstone.js
@@ -312,7 +312,7 @@ function resolve(options, callback) {
             if (uri.protocol) {
                 var filepath = path.join(cache, cachepath(l.Datasource.file));
                 path.exists(filepath, function(exists) {
-                    if (exists) {
+                    if (exists && !(l.cache_method && l.cache_method === 'live')) {
                         symlink(filepath);
                     } else {
                         utils.mkdirP(path.dirname(filepath), 0755, function(err) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant