Skip to content

Commit

Permalink
refactor: rename PricesCache to PriceSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Mar 2, 2024
1 parent d460580 commit 55653b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cli/lib/cache/market_price_snapshot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ extension MarketPricePredictions on MarketPrice {

/// A collection of price records.
// Could consider sharding this by system if it gets too big.
class MarketPriceSnapshot extends PricesCache<TradeSymbol, MarketPrice> {
class MarketPriceSnapshot extends PriceSnapshot<TradeSymbol, MarketPrice> {
/// Create a new price data collection.
MarketPriceSnapshot(super.records);

Expand Down
5 changes: 2 additions & 3 deletions packages/cli/lib/cache/prices_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import 'package:types/types.dart';

/// A collection of price records.
// Could consider sharding this by system if it gets too big.
// TODO(eseidel): rename PricesSnapshot
class PricesCache<Symbol extends Object, Record extends PriceBase<Symbol>> {
class PriceSnapshot<Symbol extends Object, Record extends PriceBase<Symbol>> {
/// Create a new price data collection.
PricesCache(this.prices);
PriceSnapshot(this.prices);

/// The price records.
final List<Record> prices;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/cache/shipyard_prices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:db/db.dart';
import 'package:types/types.dart';

/// A collection of price records.
class ShipyardPriceSnapshot extends PricesCache<ShipType, ShipyardPrice> {
class ShipyardPriceSnapshot extends PriceSnapshot<ShipType, ShipyardPrice> {
/// Create a new price data collection.
ShipyardPriceSnapshot(super.records);

Expand Down

0 comments on commit 55653b6

Please sign in to comment.