get result of search in database postgresql and work with it every time
From PostgreSQL's point of view you can use Materialized Views or Unlogged Tables

For other solutions you can check different caching mechanisms