func (store *Cache) UpdateObjectStatus(orgID string, objectType string, objectID string, status string) common.SyncServiceError {
	return store.Store.UpdateObjectStatus(orgID, objectType, objectID, status)
}
UpdateObjectStatus updates an object's status
package storage
import (
	"fmt"
	"io"
	"sync"
	"time"
	"github.com/open-horizon/edge-sync-service/common"
)
type Cache struct {
	destinations map[string]map[string]common.Destination
	Store        Storage
	lock         sync.RWMutex
}
func (store *Cache) Init() common.SyncServiceError {
	if err := store.Store.Init(); err != nil {
		return err
	}
	return store.cacheDestinations()
}
func (store *Cache) cacheDestinations() common.SyncServiceError {
	destinations, err := store.Store.RetrieveDestinations("", "")
	if err != nil {
		return &Error{"Failed to initialize the cache. Error: " + err.Error()}
	}
	store.lock.Lock()
	defer store.lock.Unlock()
	store.destinations = make(map[string]map[string]common.Destination, 0)
	for _, dest := range destinations {
		if store.destinations[dest.DestOrgID] == nil {
			store.destinations[dest.DestOrgID] = make(map[string]common.Destination, 0)
		}
		id := dest.DestType + ":" + dest.DestID
		store.destinations[dest.DestOrgID][id] = dest
	}
	return nil
}
func (store *Cache) Stop() {
	store.Store.Stop()
}
func (store *Cache) PerformMaintenance() {
	store.Store.PerformMaintenance()
}
func (store *Cache) Cleanup(isTest bool) common.SyncServiceError {
	return store.Store.Cleanup(isTest)
}
func (store *Cache) StoreObject(metaData common.MetaData, data []byte, status string) ([]common.StoreDestinationStatus, common.SyncServiceError) {
	return store.Store.StoreObject(metaData, data, status)
}
func (store *Cache) StoreObjectData(orgID string, objectType string, objectID string, dataReader io.Reader) (bool, common.SyncServiceError) {
	return store.Store.StoreObjectData(orgID, objectType, objectID, dataReader)
}
func (store *Cache) StoreObjectTempData(orgID string, objectType string, objectID string, dataReader io.Reader) (bool, common.SyncServiceError) {
	return store.Store.StoreObjectTempData(orgID, objectType, objectID, dataReader)
}
func (store *Cache) RemoveObjectTempData(orgID string, objectType string, objectID string) common.SyncServiceError {
	return store.Store.RemoveObjectTempData(orgID, objectType, objectID)
}
func (store *Cache) RetrieveTempObjectData(orgID string, objectType string, objectID string) (io.Reader, common.SyncServiceError) {
	return store.Store.RetrieveTempObjectData(orgID, objectType, objectID)
}
func (store *Cache) AppendObjectData(orgID string, objectType string, objectID string, dataReader io.Reader, dataLength uint32,
	offset int64, total int64, isFirstChunk bool, isLastChunk bool) common.SyncServiceError {
	return store.Store.AppendObjectData(orgID, objectType, objectID, dataReader, dataLength, offset, total, isFirstChunk, isLastChunk)
}