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

Open
ShieLian opened this issue Dec 12, 2016 · 6 comments
Open

缓存已经查询过的课程的上课时间 #22

ShieLian opened this issue Dec 12, 2016 · 6 comments
Labels

Comments

@ShieLian
Copy link
Collaborator

比如利用Loacalstorage

@ComMouse
Copy link
Collaborator

ComMouse commented Dec 12, 2016

介意细化一下功能点嘛 =3=

@ShieLian
Copy link
Collaborator Author

稍微研读了一下代码,课程的安排信息在parse以后是用节点存在了dom里,可以考虑加上时间戳后以Json格式存在LocalStorage里。

@ComMouse
Copy link
Collaborator

额……我的意思是要缓存了干什么……因为没有看懂标题

@ShieLian
Copy link
Collaborator Author

现在只有爬过一遍课程才能知道课程的时间安排,然后才能在小课表上看课程的时间,然而每次都要爬一遍一是太耗时,二是增加了不小的服务器压力。如果使用本地缓存时间安排的话,在试选阶段就可以爬取好时间安排缓存在本地,方便查看时间安排(也可以给冲突高亮做铺垫)。

@ComMouse
Copy link
Collaborator

但是现在的时间高亮是包括人数情况的(课有没有满),感觉这个应该不能缓存?

@ShieLian
Copy link
Collaborator Author

ShieLian commented Dec 15, 2016

可以只缓存时间安排,绘制的时候稍微改动一下代码就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants