Something I've been thinking about in case it helps anyone else - I've been working on learning language and lines, and one of the issues I was having was that I'd take down a line or a lick and learn it in a practice session, and then move on and never touch it again and I'd forget it.
I'm trying to now get into a habit of applying the technique of "spaced repetition", so a bit of repeated practice of the same lick, ideally as soon as possible after the first time, and then with bigger and bigger gaps. So for example, practice the same lick 2 days in a row, and then revisit it (even just briefly) after a week, then maybe after another 2 weeks.
I'm finding things stick a lot firmer this way, and are more likely to come out in my improvising!
Same thing should be applicable to other things not just licks, e.g. learning repertoire