安装:
sudo apt-get install ccache
使用:
ccache -s
显示状态参数 (s是英语status的缩写,表示《状态》)
ccache -C
清除缓存(C是大写的,是英语Clear的缩写,表示《清除》)
配置:
编辑 .bashrc 文件
vi ~/.bashrc
在其中加入以下三行
export NDK_CCACHE = ccache export CCACHE_DIR = ~/.ccache # 目录随意 export PATH = /usr/lib/ccache:$PATH
source ~/.bashrc
source命令使修改立即生效
分配缓存大小:
ccache -M 5G
#(分配5G缓存)