The memory cache functionality added in https://github.com/octobercms/library/pull/253 should work flawlessly with any query.
Queries that are built on Illuminate\Database\Query\Expressions via $query->addSelect(new Expression($values)); fail hard with Exception: Illegal offset type in October\Rain\Database\MemoryCache->put() on the $this->tableMap[$query->from][] = $hash; line.
Utilize the Searchable Trait on any model and then perform a query that triggers that trait. This will replace $query->from with an Expression object that will not be explicitly cast to string for utilizing as an array key in the MemoryCache implementation.
Fix in progress
Props to @triasrahman for reporting initially.
Most helpful comment
Props to @triasrahman for reporting initially.