+  HandyCache форум
|-+  Главная категория» English forum» [Request] Rules for Partial Content of Audio Streaming on 4shared.com
Имя пользователя:
Пароль:
Страниц: [1]   Вниз
  Отправить эту тему    Печать  
Автор Тема: [Request] Rules for Partial Content of Audio Streaming on 4shared.com  (Прочитано 6198 раз)
0 Пользователей и 1 Гость смотрят эту тему.
Eko
Новичок
*

Репутация: +0/-0
Offline Offline

Сообщений: 7


« : 13 января 2012, 13:14:24 »

As I know, latest version of HandyCache : http://handycache.ru/component/option,com_remository/Itemid,2/func,fileinfo/id,44/
said: Partial Content has been fixed. It's mean HandyCache support Partial Content enter to cache.

When I try 4shared.com on audio streaming using mp3 files (not download) it didn't enter to cache and always load back when I use same link.

Could anyone help me to create some rules for Partial Content on 4shared.com ?
Please help me.
Сообщить модератору   Записан
mai62
Автор HC
*****

Репутация: +226/-4
Offline Offline

Сообщений: 6383


« Ответ #1 : 13 января 2012, 13:36:30 »

Partial Content is supported only for the requests for reading from the cache. Files loaded not completely do not remain in the cache.
Сообщить модератору   Записан
Eko
Новичок
*

Репутация: +0/-0
Offline Offline

Сообщений: 7


« Ответ #2 : 18 января 2012, 21:05:33 »

Partial Content is supported only for the requests for reading from the cache. Files loaded not completely do not remain in the cache.

If you have time, maybe you could consider to get some referrences of Partial Contents Caching from Varnish Cache.
This is the URL of Varnish Cache : https://www.varnish-cache.org
It really work on BSD Family (I have tested it) and also works well on Web Server (server side) and Local Server (Client Side).
Please be carefull when you reverse it since (for me) it's not easy to reverse caching between server side and client side.

Disclaimer
I'm not Varnish Cache staff.
I just happy user of it.
Сообщить модератору   Записан
reges007
Новичок
*

Репутация: +0/-0
Offline Offline

Сообщений: 29


« Ответ #3 : 19 мая 2012, 23:04:45 »

problem solved using extension by DenZzz

Код:
--[[ <HCExtension>
@name          Ñîõðàíÿòü íóæíûå îòâåòû 404 (A-404s)
@author        DenZzz
@version       1.1 äëÿ HC v1.00 RC2 (1.0.0.175) è âîçìîæíî âûøå
@description   Ñîõðàíÿåò íóæíûå îòâåòû ñ êîäîì '404 Not Found'
@rule          ^http://.*?4shared\.com/
@event         AnswerHeaderReceived/Answer
</HCExtension> ]]


function GetAnswerCode(s)
  _,_,x = string.find(s, 'HTTP/1%.%d +(%d+)')
  if x==nil then return -1 else return tonumber(x) end
end


function Answer()

 -- âûÿñíÿåì êîä îòâåòà èç çàãîëîâêà
  answ_code = GetAnswerCode(hc.answer_header)

 -- åñëè êîä îòâåòà 404
  if answ_code==206 then
     hc.action = 'save-'
     hc.monitor_string = hc.monitor_string..'save 206 '
     hc.answer_header,_ = string.gsub(hc.answer_header, '^HTTP/1%.%d +206', 'HTTP/1.1 206', 1)
  end

end  -- Êîíåö ôóíêöèè Answer

just edit answ_code and add rule for url specific site



sorry Eko berhubung di kaksus sudah terbuka maka ya sekalian saja dibuka untuk global.
Сообщить модератору   Записан
Страниц: [1]   Вверх
  Отправить эту тему    Печать  

 
Перейти в: