Question: I have the below code.

```
DesiredCapabilities capabilities =DesiredCapabilities.android();
capabilities.setCapability("device","Android");
            capabilities.setCapability("deviceName","hammerhead");
            capabilities.setCapability("platformName","Android");
            capabilities.setCapability("appPackage","com.android.calculator2");
            capabilities.setCapability("appActivity","com.android.calculator2.Calculator");
AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
            driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
            driver.findElement(By.xpath("//*[@resource-id='com.android.calculator2:id/digit_7']")).click();
            driver.findElement(By.xpath("//*[@resource-id='com.android.calculator2:id/op_add']")).click();
driver.startActivity("com.android.browser","com.android.browser.BrowserActivity");

```

"java.lang.reflect.InvocationTargetException" error is thrown on executing driver.startActivity line. What mistake I'm making here?

Answer: 
You can use cache tags to do this.

```
public function putUserCacheData($key, $value){
    \Cache::tags($this->login)->put($key, $value, 30);
}

// Remove all entries
Cache::tags($this->login)->flush();

// Remove only param1
Cache::tags($this->login)->forget('param1');

```

But note that cache tags are not supported when using the file or database cache drivers.
Unfortunely u can't do it with scratch laravel 5.\*. It's better to use database or if its temp data u can easily do it with Sessions:

```
Session::put('some', ['data' => 'value', 'key2' => 'value2']);

Session::forget('some.data');

return Session::get('some');

```