Commit Graph

3 Commits (126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8)

Author SHA1 Message Date
Tatsuhiro Tsujikawa df5f1fe77f Fixed bug that size_ is not updated when WrDiskCacheEntry::append is called 2012-12-06 03:04:05 +09:00
Tatsuhiro Tsujikawa 838949ab85 Append new data to the contagious cache data
If we receive small data (e.g., 1 or 2 bytes), cache entry becomes a
headache. To mitigate this problem, we allocate cache buffer at least
4KiB and append the data to the contagious cache data.
2012-12-06 02:23:32 +09:00
Tatsuhiro Tsujikawa f314719618 Added --disk-cache option
This option enables disk cache. If SIZE is 0, the disk cache is
disabled. This feature caches the downloaded data in memory, which
grows to at most SIZE bytes. The cache storage is created for aria2
instance and shared by all downloads. The one advantage of the disk
cache is reduce the disk seek time because the data is written in
larger unit and it is reordered by the offset of the file. If the
underlying file is heavily fragmented it is not the case.
2012-12-03 01:39:10 +09:00