[bd] Cache 1.1.0

MacKen

Sergeant
Code hoặc hướng dẫn này được sử dụng trên phiên bản Xenforo cũ đã quá hạn sử dụng. Bạn hãy click để tìm bản mới hơn
[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.
 
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ễ
 
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
 
Đâ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
 
Đâ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ử
 
Đâ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
 
Back
Top