[bd] Cache 1.1.0

MacKen

Sergeant
Tham gia
30/11/2015
Bài viết
626
Được Like
543
[bd] Cache
Faster and faster.

[FEATURES]
1. "Cache Pages" (guests only) for top speed
2. Admin can purge cache for individual page any time
3. "CSS to file" for faster serving, make it possible to put stylesheets behind CDN
4. “Defer JS” to make sure the page display in user browser as soon as possible.

[INSTALLATION]
1. Upload files and directories inside `upload` to XenForo's root directory. Select "Merge" for everything if you are asked
2. Import the .xml file using XenForo add-on importer
3. ???
4. Profit

[TECHNICAL INFORMATION]
"Cache Pages" keeps a copy of the whole page so it will save database queries and server resource. It is possible to render page with 0 database query, page time is cut by half in all cases (usually more, up to two third of the actual render time). The feature works with or without a cache backend, it will store data in internal data directory if no cache backend is configured.

"CSS to file" simply copies the result of css.php and put it into a static file in external data directory. Normally, a request to css.php will ask for some combination of CSS templates (not just one), the add-on hashes the requested templates and keep a copy for each combination. That sounds like a lot of wasted space but in practice there are usually less than 30 combinations in used. With this feature enabled, you can setup to serve these stylesheets with a CDN and improve speed further.
 

Đính kèm

  • bd_Cache_v1.1.0_plus1.zip
    58.6 KB · Lượt xem: 207

minhdat

Corporal
Tham gia
18/11/2015
Bài viết
153
Được Like
94
có cách nào giới hạn dung lượng thư mục cache không mn
 
  • Like
Reactions: THB

MacKen

Sergeant
Tham gia
30/11/2015
Bài viết
626
Được Like
543
Việc giới hạn với addon này chắc sẽ đợi chủ nhân addon này nâng cấp set time delect cache.... còn hiện tại version này các bạn tự delect = tay ...

Ngoài ra các bạn có thể viết vài hàm cho file php check time sau thời gian mình set mặc định thì dùng cron để nó tự check và delect .... cái này khó với các bạn nhĩ... đối vời nhà nghề thì dễ
 

minhdat

Corporal
Tham gia
18/11/2015
Bài viết
153
Được Like
94
Việc giới hạn với addon này chắc sẽ đợi chủ nhân addon này nâng cấp set time delect cache.... còn hiện tại version này các bạn tự delect = tay ...

Ngoài ra các bạn có thể viết vài hàm cho file php check time sau thời gian mình set mặc định thì dùng cron để nó tự check và delect .... cái này khó với các bạn nhĩ... đối vời nhà nghề thì dễ
cho mình xin đoạn cron job để xóa thư mục đó định kì được không bạn
 

MacKen

Sergeant
Tham gia
30/11/2015
Bài viết
626
Được Like
543
OK ... Mình sẽ viết cho các bạn trưa mai ....mình sẽ up
 

MacKen

Sergeant
Tham gia
30/11/2015
Bài viết
626
Được Like
543
Đây là file xoa-txt.php các bạn úp vào thư mục của forum ngang hang file index.php cua forum nhé.

Sau khi up xong các bạn chaỵ link xoa-txt.php sẽ delect all trừ file index.html mình ko cho xóa thôi

Còn bạn nào muốn cron thì add link vào set thời gian lúc nào chạy link xoa-txt.php thì nó tự động đếm thời gian xóa.


Ngoài ra mình cũng có thể viết thêm hàm kiểm tra file nào đó trước thời gian mình set nó sẽ xóa đi .. còn sau nó sẽ ko xóa.... mình nghĩ các bạn đã dùng command cron để xóa thì ko cần thời gian cho file nữa.


DEMO: http://khatvongsong.vn/xoa-txt.php
 

Đính kèm

  • xoa-txt.php
    831 bytes · Lượt xem: 19

minhdat

Corporal
Tham gia
18/11/2015
Bài viết
153
Được Like
94
Đây là file xoa-txt.php các bạn úp vào thư mục của forum ngang hang file index.php cua forum nhé.

Sau khi up xong các bạn chaỵ link xoa-txt.php sẽ delect all trừ file index.html mình ko cho xóa thôi

Còn bạn nào muốn cron thì add link vào set thời gian lúc nào chạy link xoa-txt.php thì nó tự động đếm thời gian xóa.


Ngoài ra mình cũng có thể viết thêm hàm kiểm tra file nào đó trước thời gian mình set nó sẽ xóa đi .. còn sau nó sẽ ko xóa.... mình nghĩ các bạn đã dùng command cron để xóa thì ko cần thời gian cho file nữa.


DEMO: http://khatvongsong.vn/xoa-txt.php
Cảm ơn bạn ^^, xíu up lên thử
 

singh

Sergeant
Tham gia
08/06/2015
Bài viết
470
Được Like
276
Đây là file xoa-txt.php các bạn úp vào thư mục của forum ngang hang file index.php cua forum nhé.

Sau khi up xong các bạn chaỵ link xoa-txt.php sẽ delect all trừ file index.html mình ko cho xóa thôi

Còn bạn nào muốn cron thì add link vào set thời gian lúc nào chạy link xoa-txt.php thì nó tự động đếm thời gian xóa.


Ngoài ra mình cũng có thể viết thêm hàm kiểm tra file nào đó trước thời gian mình set nó sẽ xóa đi .. còn sau nó sẽ ko xóa.... mình nghĩ các bạn đã dùng command cron để xóa thì ko cần thời gian cho file nữa.


DEMO: http://khatvongsong.vn/xoa-txt.php
theo như code của bạn thì xóa cache trong thư mục này
removing /home/khatvongsong.vn/public_html/cache/

Nhưng addon này cache lưu trữ trong
home/khatvongsong.vn/public_html/data/bdCache/css
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom