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

Drop cache if it is not used #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Drop cache if it is not used #56

wants to merge 1 commit into from

Conversation

j0tunn
Copy link

@j0tunn j0tunn commented Apr 27, 2016

No description provided.

@j0tunn
Copy link
Author

j0tunn commented Apr 27, 2016

@blond @arikon Take a look please

@j0tunn j0tunn mentioned this pull request Apr 27, 2016
2 tasks
@@ -19,7 +19,7 @@ module.exports = function (f, opts) {
makePlatform = new MakePlatform(),
logger;

return makePlatform.init(path.resolve(opts.dir))
return makePlatform.init(path.resolve(opts.dir), null, null, { useCache: opts.cache })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

То есть, раньше вообще опции про кеш не пробрасывались?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этож не тот кэш, который был раньше, а тот, который приедет с fileCache.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Просто раньше в init опции про кэш не использовались, там дальше идет отдельная проверка, типа:

if (opts.cache) {
    makePlatform.loadCache();
}

И первая версия файлового кэша была заточена под такой способ инициализации: сначала restricted режим, а в loadCache я его сбрасывал, но это нифига не очевидно, по-этому пробрасываю опцию здесь, чтоб она прилетела в конструктор FileCache

@arikon
Copy link
Member

arikon commented Apr 27, 2016

🆗

@@ -8,7 +8,7 @@ var path = require('path'),
* @param {Function} [f]
* @param {Object} [opts]
* @param {String} [opts.dir] Корень проекта.
* @param {Boolean} [opts.noCache=false] Не учитывать кэш при запуске таска.
* @param {Boolean} [opts.cache=true] Учитывать кэш при запуске таска.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это я просто поправил багу в описании

@j0tunn j0tunn force-pushed the feature/use.cache branch from 1a089c4 to 4bf98a2 Compare May 13, 2016 15:06
@j0tunn j0tunn changed the title Pass useCache option to makePlatform.init Drop cache if it is not used May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants