群友分享transmission修改写入缓存时间的代码
https://github.com/transmission/transmission/blob/master/libtransmission/session.c#L71enum
{
#ifdef TR_LIGHTWEIGHT
DEFAULT_CACHE_SIZE_MB = 2,
DEFAULT_PREFETCH_ENABLED = false,
#else
DEFAULT_CACHE_SIZE_MB = 4,
DEFAULT_PREFETCH_ENABLED = true,
#endif
SAVE_INTERVAL_SECS = 360
};
SAVE_INTERVAL_SECS 默认值缓存6分钟读盘一次,只有写入缓存,TR原生代码上是没读取缓存的
群友给的一键修改代码,改为20分钟写入缓存
&& sed -i 's/SAVE_INTERVAL_SECS = 360$/SAVE_INTERVAL_SECS = 1200/g'/opt/transmission-$TRANSMISSION_VERSION/libtransmission/session.c \
{:3045:}
页:
[1]