/**
  *
  * @param AsyncTransaction $transaction
  */
 public function create(AsyncTransaction $transaction)
 {
     // Add to cache
     $id = $transaction->getId();
     \App::log()->debug("Adding transaction {$id}");
     \App::cache()->save($transaction, $this->_getCacheId($id), array(), 3600 * 24 * 30);
 }
 public function testCreateAndLoad()
 {
     $transactionId = $this->_transactionIds[0];
     // Create
     $model = new Async\Model\AsyncTransaction();
     $model->setId($transactionId);
     $model->tags = array('ewewe', '2222ee');
     $model->ids = array('ewwwwewe', '2ww222ee');
     $this->_asyncService->create($model);
     // Load
     $result = $this->_asyncService->load($transactionId);
     $this->assertNotNull($result->tags);
     $this->assertEquals($model->tags, $result->tags);
     $this->assertNotNull($result->ids);
     $this->assertEquals($model->ids, $result->ids);
 }