You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cache.go
    path of file: ./repos/video-srt-windows/app/datacache
    
    the code of the file until where you have to start completion: package datacache

import (
	"os"
	"videosrt/app/tool"
)

type AppCache struct {
	RootDir string
	Dir string
	File string
    
func NewAppCahce(rootdir string , file string) *AppCache {
	c := new(AppCache)
	c.Dir = "data/json"
	c.RootDir = rootdir
	c.File = c.RootDir + "/" + c.Dir + "/" + file + ".json"

	c.initDir()
	return c
}