►
From YouTube: GitLab: Enabling the Dependency Proxy Cleanup Policies
Description
A quick overview of the Dependency Proxy cleanup policies and how to enable them using GraphQL.
Links from the video
Docs: https://docs.gitlab.com/ee/user/packages/dependency_proxy/#cleanup-policies
GraphQL Explorer: https://gitlab.com/-/graphql-explorer
A
A
And
what
we're
going
to
be
looking
at
is
how
we
can
clear
the
dependency
proxy
cache.
So,
as
you
know,
if
you're
using
the
dependency
proxy,
we
are
caching
images
into
your
group's
storage
and
so
over
time
those
images
can
add
up
and
maybe
you're
not
using
them
all
anymore,
and
so
it'd
be
good
to
clear
out
that
extra
space,
previously
we've
been
able
to
clear
the
entire
cache
by
using
the
api.
A
A
If
you
set
your
policy
to
30
days,
then
after
30
days,
all
of
the
underlying
files
for
that
image
will
be
removed.
If
any
time
before
that
month
passes
you
pull
that
same
image
and
reuse
that
cached
image
again,
then
it
will
reset
that
30-day
count.
A
A
And
so
this
is
available
on
every
instance
of
gitlab,
including
gitlab.com.
So
when
you
are
logged
into
gitlab.com,
you
can
make
queries
of
your
own
of
any
of
your
of
anything
that's
available
within
the
graphql
api.
So
if
we're
trying
to
take
a
look
at
if
a
given
group
has
this
feature
enabled
or
not,
first,
I
have
a
group
here.
It's
just
s,
abrams
public
group
and
we
can
see
we
have
a
dependency
proxy
that
is
running.
A
A
A
So
you
don't
need
to
worry
about
doing
this
to
check
your
policy
before
you
get
started
if
you're
just
ready
to
turn
it
on.
We
can
jump
straight
back
to
the
docs
and
use
this
mutation
in
order
to
update
the
dependency
proxy
policy
and
set
it
to
enable
this
true.
So
I'm
just
going
to
copy
this
and
we'll
head
back
over
here.
A
And
let's
say
instead
of
instead
of
using
90
days,
we
want
to
be
very
aggressive
and
start
expiring.
Anything
that
hasn't
been
used
in
seven
days,
and
so
what
this
is
saying
is
that
we're
going
to
change
these
fields
for
this
group
and
then
once
the
change
occurs,
we
would
like
to
receive
back
these
fields
to
see
what
changes
were
actually
made.
So
if
I
do
that
now
we
can
see
that,
for
that
group
the
policy
is
now
enabled,
and
it
has
a
time
to
live
of
seven
days.
A
So
any
images
that
are
older
than
seven
days
will
start
to
be
removed.
The
cleanup
policies
for
the
dependency
proxy
run
once
daily.
So
once
every
day,
if
you
have
your
policy,
enabled
your
dependency
proxy
cash
will
be
scanned
and
anything
that
is
older
or
that
sorry
that
hasn't
been
used
in
seven
days
will
be
removed.