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

多个视图缓存 #22

Closed
alicecatherine opened this issue Jun 4, 2015 · 5 comments
Closed

多个视图缓存 #22

alicecatherine opened this issue Jun 4, 2015 · 5 comments

Comments

@alicecatherine
Copy link

@@@@

@zhaoda
Copy link
Owner

zhaoda commented Jun 4, 2015

这违背的了SPA的架构设计,况且如果只保存一个试图,保存哪个呢?
你说的url是包含hash的部分么?还是不包含?

@zhaoda
Copy link
Owner

zhaoda commented Jun 4, 2015

因为:param变动了,等于是切换一个新页面了。

@zhaoda
Copy link
Owner

zhaoda commented Jun 4, 2015

设置清理页面最多缓存的页面数量行不行?

$doc.trigger('spa:viewcachecount', {count: 5})

https://github.com/zhaoda/spa/blob/master/src/spa.js#L1816

@zhaoda
Copy link
Owner

zhaoda commented Jun 5, 2015

是在spa:boot事件之前调用的?
你的项目里包含面板视图么?
只是设置5个报错,2、3、4、6……试过么?对了,别设置成1。

$doc.trigger('spa:viewcachecount', {count: 5})
$doc.trigger('spa:boot')

@zhaoda
Copy link
Owner

zhaoda commented Jun 8, 2015

恩,理解你的意思了,但是目前还不是这样的设计,你可以自己改一下底层来实现

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

2 participants