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: images.go
    path of file: ./repos/werf/pkg/storage/lrumeta
    
    the code of the file until where you have to start completion: package lrumeta

import (
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"time"

	"github.com/werf/lockgate"
	"github.com/werf/logboek"
	"github.com/werf/werf/pkg/util"
	"github.com/werf/werf/pkg/werf"
)

const LRUImagesCacheVersion = "1"

var CommonLRUImagesCache *LRUImagesCache

func Init() error {
	CommonLRUImagesCache = NewLRUImagesCache(filepath.
    
func (cache *LRUImagesCache) AccessImage(ctx context.Context, imageRef string) error {
	logProcess := logboek.Context(ctx).Debug().LogProcess("-- LRUImagesCache.AccessImage %s", imageRef)
	logProcess.Start()
	defer logProcess.End()

	if lock, err := cache.lock(ctx, imageRef); err != nil {
		return err
	} else {
		defer cache.unlock(lock)
	}

	record := &LRUImagesCacheRecord{
		AccessTimestampNanosec: time.Now().UnixNano(),
		ImageRef:               imageRef,
	}

	return cache.writeRecord(record)
}