M2Repository repository = (M2Repository) this.getRepositoryRegistry().getRepository("repo1");
String item = "/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.pom";
ResourceStoreRequest request = new ResourceStoreRequest(item);
request.getRequestContext().put(AccessManager.REQUEST_REMOTE_ADDRESS, "127.0.0.1");
StorageItem storageItem = repository.retrieveItem(request);
long lastRequest = System.currentTimeMillis() - 10 * A_DAY;
storageItem.setLastRequested(lastRequest);
repository.storeItem(false, storageItem);
// now request the object, the lastRequested timestamp should be updated