236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
** Manage the cache used for potentially expensive web pages such as
** /zip and /tarball. SUBCOMMAND an be:
**
** clear Remove all entries from the cache.
**
** init Create the cache file it it does not already exists.
**
** list List the keys and content sizes and other stats for
** all entries currently in the cache
**
** status Show a summary of cache status.
**
** The cache is stored in a file that is distinct from the repository
** but that is held in the same directory as the repository. To cache
** file can be deleted in order to completely disable the cache.
|
|
|
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
** Manage the cache used for potentially expensive web pages such as
** /zip and /tarball. SUBCOMMAND an be:
**
** clear Remove all entries from the cache.
**
** init Create the cache file it it does not already exists.
**
** list|ls List the keys and content sizes and other stats for
** all entries currently in the cache
**
** status Show a summary of cache status.
**
** The cache is stored in a file that is distinct from the repository
** but that is held in the same directory as the repository. To cache
** file can be deleted in order to completely disable the cache.
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
if( db ){
sqlite3_exec(db, "DELETE FROM cache; DELETE FROM blob; VACUUM;",0,0,0);
sqlite3_close(db);
fossil_print("cache cleared\n");
}else{
fossil_print("nothing to clear; cache does not exist\n");
}
}else if( strncmp(zCmd, "list", nCmd)==0 ){
db = cacheOpen(0);
if( db==0 ){
fossil_print("cache does not exist\n");
}else{
int nEntry = 0;
char *zDbName = cacheName();
cache_register_sizename(db);
|
|
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
if( db ){
sqlite3_exec(db, "DELETE FROM cache; DELETE FROM blob; VACUUM;",0,0,0);
sqlite3_close(db);
fossil_print("cache cleared\n");
}else{
fossil_print("nothing to clear; cache does not exist\n");
}
}else if(( strncmp(zCmd, "list", nCmd)==0 ) || ( strncmp(zCmd, "ls", nCmd)==0 )){
db = cacheOpen(0);
if( db==0 ){
fossil_print("cache does not exist\n");
}else{
int nEntry = 0;
char *zDbName = cacheName();
cache_register_sizename(db);
|