Module: Gitlab::ImportExport::Base

Defined in:
lib/gitlab/import_export/base/object_builder.rb,
lib/gitlab/import_export/base/relation_factory.rb,
lib/gitlab/import_export/base/relation_object_saver.rb

Defined Under Namespace

Classes: ObjectBuilder, RelationFactory, RelationObjectSaver

Constant Summary collapse

LRU_CACHE_SIZE =

Base class for Group & Project Object Builders. This class is not intended to be used on its own but rather inherited from.

Cache keeps 1000 entries at most, 1000 is chosen based on:

- one cache entry uses around 0.5K memory, 1000 items uses around 500K.
  (leave some buffer it should be less than 1M). It is afforable cost for project import.
- for projects in Gitlab.com, it seems 1000 entries for labels/milestones is enough.
  For example, gitlab has ~970 labels and 26 milestones.
1000