@@ -8,7 +8,6 @@ import path from 'path';
88import os from 'os' ;
99import type { SymbolIndex , SymbolResult , SupportedLanguage } from '../types/index.js' ;
1010import { createHash } from 'crypto' ;
11- import { CACHE_DIR_PERMISSIONS , CACHE_FILE_PERMISSIONS } from '../utils/security.js' ;
1211
1312const CACHE_VERSION = '1.0.0' ;
1413const CACHE_DIR_NAME = '.code-search-mcp-cache' ;
@@ -56,18 +55,15 @@ export class CacheManager {
5655 }
5756
5857 /**
59- * Initialize the cache directory with secure permissions .
58+ * Initialize the cache directory.
6059 */
6160 async initialize ( ) : Promise < void > {
6261 if ( ! this . enableCache ) {
6362 return ;
6463 }
6564
6665 try {
67- await fs . mkdir ( this . cacheDir , {
68- recursive : true ,
69- mode : CACHE_DIR_PERMISSIONS ,
70- } ) ;
66+ await fs . mkdir ( this . cacheDir , { recursive : true } ) ;
7167 } catch {
7268 this . enableCache = false ;
7369 }
@@ -285,11 +281,7 @@ export class CacheManager {
285281 } ;
286282
287283 const cacheFilePath = this . getCacheFilePath ( workspaceId ) ;
288- await fs . writeFile (
289- cacheFilePath ,
290- JSON . stringify ( cached , null , 2 ) ,
291- { mode : CACHE_FILE_PERMISSIONS }
292- ) ;
284+ await fs . writeFile ( cacheFilePath , JSON . stringify ( cached , null , 2 ) , 'utf-8' ) ;
293285 } catch {
294286 // Don't throw - caching is optional
295287 }
0 commit comments