Do gettempdirectory needs to be emptied after some...
# lucee
g
Do gettempdirectory needs to be emptied after some days or it automatically does it
a
Look at the age of the files in the dir. What can you infer from that info?
g
Well files do pile up but my question is still unanswered If that does not get empty does it throw error
a
Your question was:
Do gettempdirectory needs to be emptied after some days or it automatically does it
You just answered that yourself. My point for this part was really that instead of a question popping into your head and then typing it out here, you could do some very very simple research of your own and probably answer your own questions. Just needs you to do a tiny bit of effort before expecting other people to put in some for you. As for this causing errors? Doubtful. But, again, you could test this yourself by giving it a clean out and seeing what happens.
g
I was confused because we were getting an error and then I wrote a code to empty the temp directory and I was not sure if that temp directory was causing it or not Which I am still not sure So I changed a lot of code and it did not worked Then I removed the code temp directory and reverted the code and it started working I am still not sure why it happened first time
a
Possibly changing too much at once? When troubleshooting - if poss (and it's not always) - perform one experiment at a time. And don't try stuff at random: plan it out, eg "if I do [this], then I am expecting [that]". Do it, wait and see. Depending on the results then decide whether to roll that code back and try something else; or to leave the code and update it further. But always be deliberate and methodical about it. This sort of thing is tough to troubleshoot sometimes though, given it involves external systems in this case the underlying file system)
If you try multiple things, you stand a good chance of not knowing which part of it fixed the issue, and yer none the wiser.
👍 2
g
Or worse - you made "three" changes at once and it doesn;t work - because they're somehow conflicting... But if you had done those 3 one at a time - you would have noticed that number "2" fixed your issue! Sometime later - you undo everything - out of frustration - try number "2" - and it fixes your issue.... But it end up leaving you confused - because you would tell yourself - but I tried that earlier and it didn't work... So you end up -actually doubting the fact that how you got it working - isn't right at all! Sure you leave it - afterall it's working... but instead of being able to come away with "THIS" fixed my issue and you now have something solid that you could remember and add to your knowledgebase (internal to your brain - or a wiki) -you just put it down to "some sort of weird magical shit" - and you don't really have any evidence of a solution. This happens a lot - to a lot of people - all the time. Time constraints / pressure to get it fixed quickly / pressure from customers / pressure from managers / pressure we put on ourselves : do make it hard at times... But (for troubleshooting - especially) if you can genuinely get in the mindset of : 1 change at a time - that I have documented. You save your sanity - AND can take away an addition to your own knowledge. 1 - did this change - got this result 2 - did this change - got this result 3 - did 1 & 2 - got this result And then when you driving yourself insane - you can review your notes / lists - look for any holes. Or when you come to a forum like this - you have a clear and concise list of all the things you did do and what the results were. Just the list alone - can give someone else all they need to give you an answer... 1 - would never work - because of XXX 2 - might work if you tweak it like this. And a lot of the time - writing the list and reviewing it - actually helps you to solve it yourself. But like I said - it is a hard habit to ALWAYS maintain... I certainly fall foul of "This doesn't work - please help me - I am at the end of my rope" - more times than I would like to admit.