Git Product home page Git Product logo

think-html-cache's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

noonhorse

think-html-cache's Issues

Error: adapter `adapter_store_base` not found

Error: adapteradapter_store_basenot found at Function.Adapter.get (F:\workspace\web\trunk\market_v2\node_modules\thinkjs\src\core\think_adapter.js:67:9) at Object.Adapter (F:\workspace\web\trunk\market_v2\node_modules\thinkjs\src\core\think_adapter.js:37:22) at _default.run$ (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\lib\index.js:69:25) at tryCatch (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:100:21) at invoke (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:136:37) at enqueueResult (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:185:17) at new Promise (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\core-js\library\modules\es6.promise.js:201:7) at AsyncIterator.enqueue (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:184:12) at AsyncIterator.prototype.(anonymous function) [as next] (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:100:21) at Object.runtime.async (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\node_modules\babel-runtime\regenerator\runtime.js:209:12) at _default.run (F:\workspace\web\trunk\market_v2\node_modules\think-html-cache\lib\index.js:37:32) at Function.Middleware.exec (F:\workspace\web\trunk\market_v2\node_modules\thinkjs\src\core\think_middleware.js:80:34) at _execItemMiddleware (F:\workspace\web\trunk\market_v2\node_modules\thinkjs\src\core\think_hook.js:92:27) at Function.Hook.exec (F:\workspace\web\trunk\market_v2\node_modules\thinkjs\src\core\think_hook.js:108:10)

配置:
export default {
on: true, //use html_cache
type: 'base', //cache content store type
timeout: 0,
callback: function(key) {
return think.md5(key);
},
rules: {
'sites/index/index': ['index/{page}']
},
//adapter config
adapter: {
file: {
path: think.RUNTIME_PATH + '/html_cache' //when type is file, set cache path
}
}
};

其他的都一致, 视图使用的是"/"而不是"_"

roles的数组里第一个值代表的什么意思?

如题。。
rules

cache rules, key is [module]/[controller]/[action].

can get paramters in rule:
'index_{page}' // get page paramter from GET 'index_{:module}' // get module value 'index_{:controller}' //get controller value 'index_{:action}' //get action value 'index_{cookie.xxx}' //get value from cookie
我只想缓存一个页面的话。需要怎么配置?
这些配置都有啥作用呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.